Base URL
https://YOUR-HOST
Authentication
Every /v1 call needs Authorization: Bearer <token>. The token is a signed JWT that your identity issuer provides. The service checks the signature, issuer, audience, expiry, subject and tenant. Assets and jobs belong to the tenant and subject of the token.
Conventions
JSON requests reject unknown fields. POST endpoints that create jobs accept an optional Idempotency-Key header. A repeated key with the same body returns the same job. Errors return {"detail": ...}.
POST/v1/assets
Upload a scene video (role source) or a portrait (role reference).
Request
file | form · string · requiredThe media file. |
role | form · "source" | "reference" · requiredsource for the scene video, reference for the portrait. |
Response 201
id | stringAsset ID for later calls. |
role | string"source" or "reference". |
media_type | stringDetected media type. |
bytes, sha256 | integer, stringSize and content hash. |
created_at | stringRFC 3339 timestamp. |
Errors
- 401Missing or invalid bearer token.
- 413File exceeds the upload limit.
- 415Unsupported media type, or a reference that is not a still image.
- 422Invalid input. detail holds a message, or {code, message}.
GET/v1/assets/{asset_id}/content
Download the asset bytes, including job artifacts such as the prepared guide.
Response 200
(binary) | The file, with its media type. |
Errors
- 401Missing or invalid bearer token.
- 404Asset not found or not owned by the caller.
- 422Invalid input. detail holds a message, or {code, message}.
POST/v1/faces/normalize
Cut a portrait to a transparent face oval. Finishes without review.
Request
Idempotency-Key | header · string · optionalOptional. Repeat the same key to retry safely. |
asset_id | body · string · required · 1–64 charsUploaded portrait. |
face_index | body · integer · optional · ≥ 0Face to use, from the faces endpoint. Required when several faces exist. |
Response 202
(job) | objectJob object. See the job status response. |
Errors
- 401Missing or invalid bearer token.
- 409Idempotency key reused with a different request.
- 422Invalid input. detail holds a message, or {code, message}.
POST/v1/jobs
Create a face replacement job. It pauses for input review before generation.
Request
Idempotency-Key | header · string · optionalOptional. Repeat the same key to retry safely. |
source_asset_id | body · string · required · 1–64 charsUploaded scene video. |
reference_asset_id | body · string · required · 1–64 charsUploaded portrait. |
target | body · object · optionalActor to replace: {face_index}. Required when several faces exist. |
hair_policy | body · "preserve_source" · optional · default "preserve_source"Keep the hair from the scene. |
delivery | body · "draft" · optional · default "draft"Output tier. |
authorization | body · object · required{accepted: true} confirms permission to process the video and the likeness. |
Response 202
(job) | objectJob object. See the job status response. |
Errors
- 401Missing or invalid bearer token.
- 409Idempotency key reused with a different request.
- 422Invalid input. detail holds a message, or {code, message}.
POST/v1/jobs/{job_id}/review
Accept or reject the inputs or the draft that you inspected.
Request
decision | body · "accept" | "reject" · requiredaccept or reject. |
fingerprint | body · string · required · 1–256 charsFingerprint from action_required. Must match the reviewed version. |
note | body · string · optional · 0–2000 charsOptional review note. |
Response 200
(job) | objectUpdated job. Input acceptance starts generation. |
Errors
- 401Missing or invalid bearer token.
- 409Job is not waiting for review, fingerprint changed, or technical checks failed.
- 422Invalid input. detail holds a message, or {code, message}.
POST/v1/jobs/{job_id}/cancel
Cancel a job. A cancelled job never publishes a result.
Response 200
Errors
- 401Missing or invalid bearer token.
- 409An accepted result cannot be cancelled.
- 422Invalid input. detail holds a message, or {code, message}.
POST/v1/jobs/{job_id}/resume
Safely resume an interrupted job.
Response 202
Errors
- 401Missing or invalid bearer token.
- 409The job cannot resume, or its submission state is uncertain.
- 422Invalid input. detail holds a message, or {code, message}.