Transcribe audio
/v1/speech-to-text Upload an audio or video file and get its transcript back in the same response. The connection stays open while the file is decoded and transcribed; set a client timeout of several minutes for long files.
Billing is per started second of audio, at the model's hourly price,
and only for requests that return 200. Errors and refused requests
are free, and so is a request you cancel by closing the connection
before its transcript is ready. Once it is, the request is billed even
if the connection closes before the response arrives. An
organization that cancels more than two hours of audio within an hour
is answered 429 until the hour is over.
Limits
- Files up to 250 MB, with between 0.1 seconds and 1 hour of audio.
- An upload has 30 minutes to arrive, and must average at least 16 KB per second: one slower than that is refused after 20 seconds.
- Requests per minute and requests at once depend on your organization's
tier, shown under Settings in the console. Past either, the API answers
429with aRetry-Afterheader.
Authorization
Required. Send your API key in one of these headers.
| Authorization: Bearer header | Your API key, |
| xi-api-key header | The same API key in the header the ElevenLabs SDKs send. An
ElevenLabs client can keep it; it still needs a Klang |
Body
multipart/form-data
| fileREQUIRED file | The audio, as a file part. Any common audio or video format works (MP3, WAV, M4A, AAC, FLAC, OGG, Opus, WebM, MP4 and others); the format is read from the content, not the file name. At most 250 MB and 1 hour of audio, and at least 0.1 seconds. Split longer recordings and send the parts. | ||||||||||||
| model_idREQUIRED "pianissimo" · "pianissimo_pro" |
| ||||||||||||
| language_codeREQUIRED "bg" · "cs" · "da" · "de" · "el" · "en" · "es" · "et" · "fi" · "fr" · "hr" · "hu" · "it" · "lt" · "lv" · "mt" · "nl" · "pl" · "pt" · "ro" · "ru" · "sk" · "sl" · "sv" · "uk" | The spoken language, as a two-letter ISO 639-1 code. The API also takes it in upper case, but lower case, as listed here, is the canonical form.
Swedish and Danish audio is transcribed as that language. Parakeet takes no language: it transcribes whichever of its languages it hears, so the code picks the model and the price, and is returned as given. | ||||||||||||
| keyterms array of string | Words and phrases to recognise more reliably, such as names,
products and jargon. A hint, not a replacement list: a term only
appears where it was said. | ||||||||||||
| file_format "other" · "pcm_s16le_16" |
| ||||||||||||
| enable_logging boolean | Accepted for ElevenLabs compatibility, as this form field or as the
|
Response
The transcript.
| language_code string | The |
| language_probability number | Always |
| text string | The whole transcript, punctuated. |
| words array of object | The transcript word by word, with the gaps between words as
|
| ↳text string | |
| ↳start number | Start, in seconds from the beginning of the audio. |
| ↳end number | End, in seconds from the beginning of the audio. |
| ↳type "word" · "spacing" | |
| transcription_id string · uuid | The request's id, the same as the |
| model_id "pianissimo" · "pianissimo_pro" |
|
| audio_seconds number | Length of the audio, in seconds. You are billed for it rounded up to a whole second. |
| X-Request-Id header | The request's id. Include it when you contact support. |
Errors
An error response has this body:
| error object | |
| ↳type "invalid_request_error" · "authentication_error" · "billing_error" · "rate_limit_error" · "api_error" | The kind of error. Decide what to do on |
| ↳code string | What went wrong, stable across releases. |
| ↳message string | A human-readable explanation. It can change. |
| 400 | The request is invalid. Codes:
| ||||||||||||||||||||||||||||||||
| 401 | No usable API key. Codes: | ||||||||||||||||||||||||||||||||
| 402 |
| ||||||||||||||||||||||||||||||||
| 408 |
| ||||||||||||||||||||||||||||||||
| 413 |
| ||||||||||||||||||||||||||||||||
| 429 Retry-After | Over your organization's limits. Wait
| ||||||||||||||||||||||||||||||||
| 500 |
| ||||||||||||||||||||||||||||||||
| 502 |
| ||||||||||||||||||||||||||||||||
| 503 Retry-After |
|