API reference · Audio

Audio

Text to speech in 24 languages, a voice changer for recordings, and translation of a recording or a video into speech in another language.

POST https://api.framera.ai/v1/audio/speech
POST https://api.framera.ai/v1/audio/voice-change
POST https://api.framera.ai/v1/audio/translate

Speech is $0.14 per 1,000 characters, the voice changer $0.41 per started minute and translation $0.21 a minute, charged on success. See the audio prices or get the exact price first with POST /v1/quotes, product: "audio" and the operation. Needs the audio 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.

Text to speech

POST /v1/audio/speech reads text aloud in the voice you choose, with the model speech-2.8-hd. Priced per started 1,000 characters.

textstringrequired
What to say, up to 5,000 characters.
voicestring
The voice id. Default English_expressive_narrator. GET /v1/models lists every voice with its language (24 languages), such as English_CalmWoman, Spanish_SereneWoman or German_FriendlyMan. Voices you made on framera.ai work too.
languagestring
The language of the text, such as English or French.
emotionenum
happy, sad, angry, fearful, disgusted, surprised or calm.
speednumber
From 0.5 to 2, where 1 is normal.
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.

Voice changer

POST /v1/audio/voice-change keeps what was said and how, and changes who says it. Recordings up to 5 minutes, priced per started minute.

audiostringrequired
The recording: a public https URL or an upload_… id from POST /v1/uploads.
voicestringrequired
One of the voice changer's voices, listed under voice-change in GET /v1/models, such as Rachel, Aria, Brian or George.
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.

Translate

POST /v1/audio/translate transcribes a recording, or the speech in a video, translates it and speaks the translation in the target language. The output is the translated speech as an audio file (a video is not re-dubbed). Recordings and videos up to 3 minutes.

audiostring
The recording: a public https URL or an upload_… id from POST /v1/uploads. Send either audio or video.
videostring
A video whose speech to translate: a public https URL or an upload_… id from POST /v1/uploads.
targetLanguageenumrequired
The language code to translate into: en, es, fr, de, it, pt, nl, pl, fi, cs, ro, el, uk, ru, tr, ar, hi, id, th, vi, ja, ko, zh (Mandarin) or yue (Cantonese).
voicestring
The speech voice for the translation. Defaults to a voice of the target language.
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.

The job carries the transcript, the translation, the detected sourceLanguage and the voice used.

Returns

201 Created with a job object: status: "queued", the settings you sent and its price. The job carries operation. Once it succeeds, outputs holds the audio file.

Errors

StatusCodeWhen
400invalid_requestA field is missing, wrong or out of range. The message says which; details.issues lists the fields.
401unauthorizedThe key is missing, wrong or revoked.
402insufficient_balanceYour balance is lower than the price. Top up or turn on auto-recharge.
403permission_deniedThe 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.
409idempotency_conflictThe Idempotency-Key was used with a different body, or the first request with it is still running.
422content_refusedThe request breaks the use rules. Nothing is charged.
429rate_limitedToo many requests. Retry after Retry-After seconds.
503model_pausedThe model is paused for a short while. Retry later.
500 or 503server_errorSomething went wrong on our side, or a service is briefly unavailable. Any hold is released at once.