Skip to main content
POST
Request Headers
Analyze the source video with media_type=video and type=head, wait for status=3 and track_manifest_url, then pass that analysis _id as analyze_id. Use the identical target_url and distinct mappings[].obj_id values 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 Head Swap V5 overview.

Authorizations

x-api-key
string
header
required

Body

application/json
media_type
enum<string>
required

Always video.

Available options:
video
target_url
string<uri>
required

Public source video URL; must match the completed analysis.

analyze_id
string
required

Completed head analysis ID.

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

1–5 objects pairing detected people with reference images.

Required array length: 1 - 5 elements
model_name
string

Defaults to akool-premium.

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.

prompt
string

Optional generation instructions, up to 5000 characters.

Maximum string length: 5000

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