Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API key. To get your API key, go to Developer Hub and click "Create new API Key".

Headers

Idempotency-Key
string

A unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video, image, and audio endpoints on your account, so use a new key for every project.

Example:

"5f3c1b9e-8a41-4a0e-9d3e-2f6a1c7b9e10"

Body

application/json

Body

resolution
enum<string>
required

Output resolution. Determines credits charged for the run.

Available options:
640px,
1k,
2k,
4k
Example:

"640px"

assets
object
required

Person image and scene image for body swap

name
string
default:Body Swap - dateTime

Give your image a custom name for easy identification.

Example:

"My Body Swap image"

Response

Success

Success

id
string
required

Unique ID of the image. Use it with the Get image Project API to fetch status and downloads.

Example:

"cuid-example"

credits_charged
integer
required

The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.

If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.

Example:

50