POST/audio/translations

Translate audio into English

Translates an audio file into English and returns the result in a selected format. Provide the file and model, then optionally use prompt to guide the translation style. Send the file as multipart form data with metadata that lets the service identify its audio format.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields

Multipart form data containing an audio file and translation settings. file and model are required.

filestringrequired
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include enough format metadata for the file to be identified. We recommend an extension-bearing filename and an appropriate content type.
modelstringrequired
ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
promptstringoptional
An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English.
response_formatstringoptional
The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
Allowed:jsontextsrtverbose_jsonvttDefault:json
temperaturenumberoptional
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
Default:0

9 status codes
200Returns the English translation as a text response or a transcription object, depending on the selected response format.
textstringrequired
400Returned when the audio input or request parameters are invalid.
errorobjectrequired
401Returned when the API key is missing or revoked, or the client IP is not authorized.
errorobjectrequired
403Returned when organization policy blocks access to a personal API organization.
413Returned when the audio request exceeds the supported size limit.
errorobjectrequired
429Returned when the request is rejected because a rate limit was exceeded.

One documented failure

  • slow_down

    Your request rate increased too quickly. Please reduce the request rate and gradually increase it again.

    Traffic increased too quickly

errorobjectrequired
500Returned when the audio could not be processed.
errorobjectrequired
502Returned when the upstream audio service connection fails.
errorobjectrequired
503Returned when the service is temporarily unavailable.

One documented failure

  • server_is_overloaded

    The model is temporarily overloaded. Please retry your request after a brief delay.

    The requested model is temporarily overloaded

errorobjectrequired

Error handling

A 400 is returned for invalid audio input or request parameters; a 401 indicates a missing or revoked API key or an unauthorized client IP; a 403 indicates organization policy blocks access; and a 413 indicates the request exceeds the supported size limit. A 429 indicates a rate limit was exceeded, a 500 indicates the audio could not be processed, a 502 indicates an upstream audio service connection failure, and a 503 indicates temporary service unavailability. file and model are required, model must be whisper-1, response_format must be one of the supported formats, and temperature must be between 0 and 1.