Upload a source video
Starts the upload of the video whose person will be swapped for a persona. Returns a media_id and a presigned PUT URL: PUT the raw bytes to upload_url with the same Content-Type, then call POST /personas/sources/upload/complete.
MP4 or MOV only, within video_limits of GET /personas/catalog. The video goes to the workspace library and counts toward its storage. A video already in the library needs no upload: use its id as media_id.
apiKeyX-Api-Key<token>- body
file_name*stringOriginal file name; its extension must be .mp4 or .mov.
file_size*numberSize of the file in bytes.
content_type?stringMIME type, video/mp4 or video/quicktime. Must match the bytes you PUT.
Response for status 200
application/json- response
media_id*stringPass it to the complete call, then to GET /personas/swap/quote and POST /personas/{id}/videos.
upload_url*stringPresigned PUT URL. Upload the raw bytes here.
expires_in*numberSeconds until upload_url expires.
curl -X POST 'https://api.cut.pro/api/v1/personas/sources/upload' \ -H 'Content-Type: application/json' \ -d '{ "file_name": "string", "file_size": 0}'{ "media_id": "string", "upload_url": "string", "expires_in": 0}Price a swap video GET
Measures a library video and returns what swapping its person for a persona costs at the given `quality`. Nothing is charged. Pass the returned `credits` to `POST /personas/{id}/videos` with `type: swap` and the same `quality`, which refuses with `PRICE_CHANGED` if the price is different. The price follows only the `quality`, the length and the `style`: the rate per second plus a small fixed amount per second for the scenes that keep the person the same across cuts (none with `replace` `none`, which needs a `style`; any other `replace` costs the same), and a `style` adds a traced frame for about every four seconds. How many scenes the video really has never changes it. `VIDEO_DURATION_OUT_OF_RANGE` and `VIDEO_UNSUPPORTED` (format, size or resolution) follow `video_limits` of `GET /personas/catalog` for that `quality`; a video refused at `standard` may still fit `high`.
Complete a source video upload POST
Registers the uploaded video in the library. Call it after the PUT to `upload_url` returned `200`, then price the video with `GET /personas/swap/quote`.