Skip to main content
POST
Request Headers
Choose the image or video example consistently in both analyze and create. Use a completed analysis of the identical target_url and media_type. Video requires track_manifest_url; image does not. mappings[].obj_id values must be distinct and come from analysis_result.media.
Body Attributes Response Attributes

Request examples

Select a scenario below or in the request sample to view matching request and response examples. URLs, IDs and model selections are illustrative; replace them with accessible resources, completed analyses and models available to your account. Response credit values are examples, not price quotations. Poll each returned _id until completion.
Body
For input limits, billing, callbacks, and error codes, see the Clothing Swap V5 overview.

Authorizations

x-api-key
string
header
required

Body

application/json
target_url
string<uri>
required

Public source image or video URL; must match analysis.

media_type
enum<string>
required

image or video.

Available options:
image,
video
analyze_id
string
required

Completed analysis ID for the source material.

Pattern: ^[a-fA-F0-9]{24}$
mappings
object[]
required

1–50 detected-person and reference-outfit mappings.

Required array length: 1 - 50 elements
clothing_area
enum<string>
default:Top

Top, Bottom, Full Outfit, or Auto. Values are case-sensitive.

Available options:
Top,
Bottom,
Full Outfit,
Auto
model_name
string

Defaults to akool-premium/clothing_swap.

resolution
enum<string>

480p or 720p; uses the selected model default, otherwise 480p.

Available options:
480p,
720p
keep_original_sound
boolean

Keep source video audio; defaults to true. Applies to video requests.

webhookUrl
string<uri>

Optional final-state callback URL; follow the Webhook guide.

Response

200 - application/json

Business response. Code 1000 means the request succeeded; inspect task status or data.errors for generation/submission outcomes.

code
integer
Example:

1000

msg
string
Example:

"OK"

data
object