API reference · Avatars
Create a talking avatar
A photo and a script or a voice recording become a talking video, lips in sync. Returns a job straight away.
POST https://api.framera.ai/v1/avatars
From $0.11 a second at 720p and $0.18 at 1080p, billed for at least 10 seconds, charged on success. See the avatar prices or get the exact price first with POST /v1/quotes. Needs the avatars permission.
Headers
Authorizationstringrequired
Bearer fr_live_….Idempotency-Keystring
Any unique string up to 200 characters. Retrying with the same key returns the first job instead of making a second one. The SDKs set one for you.
Body
imagestringrequired
The photo of the person who speaks: a public https URL or an
upload_… id from POST /v1/uploads. A clear, front-facing face works best. The video keeps the photo's shape, so crop the photo to the shape you want.scriptstring
The words to say, read in
voice. We count about 15 spoken characters a second, so a script can run up to 60 seconds (about 900 characters). Send either script or audio.voicestring
The voice that reads the
script. Default English_expressive_narrator. Any speech voice id from GET /v1/models, or a voice you made on framera.ai.audiostring
A recording to lip-sync instead of a script, up to 60 seconds: a public https URL or an
upload_… id from POST /v1/uploads.languagestring
The language of the script, such as
English or Spanish.resolutionenum
720p (default) or 1080p.musicboolean
Adds a music bed under the voice, for $0.088 more. Default
false.aspectRatioenum
Accepted and returned on the job; the video itself keeps the shape of your photo.
modelstring
odyssey-avatar, the default and only avatar model.webhookUrlstring
A public https URL. We POST a signed
job.succeeded, job.failed or job.cancelled event to it when the job finishes.metadataobject
Up to 20 string values of your own (keys up to 40 characters, values up to 500), such as an order id. Returned on the job and in webhooks.
Returns
201 Created with a job object: status: "queued", the settings you sent and its price. The job carries the billed durationSeconds (at least 10).
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field is missing, wrong or out of range. The message says which; details.issues lists the fields. |
| 401 | unauthorized | The key is missing, wrong or revoked. |
| 402 | insufficient_balance | Your balance is lower than the price. Top up or turn on auto-recharge. |
| 403 | permission_denied | The key lacks the permission, a monthly limit would be passed, or the address is not allowed. details.reason says which: key_permission, key_monthly_limit, monthly_limit or ip_not_allowed. |
| 409 | idempotency_conflict | The Idempotency-Key was used with a different body, or the first request with it is still running. |
| 422 | content_refused | The request breaks the use rules. Nothing is charged. |
| 429 | rate_limited | Too many requests. Retry after Retry-After seconds. |
| 503 | model_paused | The model is paused for a short while. Retry later. |
| 500 or 503 | server_error | Something went wrong on our side, or a service is briefly unavailable. Any hold is released at once. |