Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Translations

Turn audio into text or text into audio.

Create translation
POST/audio/translations
ModelsExpand Collapse
Translation object { text }
text: string
TranslationCreateResponse = Translation { text } or TranslationVerbose { duration, language, text, segments }
One of the following:
Translation object { text }
text: string
TranslationVerbose object { duration, language, text, segments }
duration: number

The duration of the input audio.

formatdouble
language: string

The language of the output translation (always english).

text: string

The translated text.

segments: optional array of TranscriptionSegment { id, avg_logprob, compression_ratio, 7 more }

Segments of the translated text and their corresponding details.

id: number

Unique identifier of the segment.

avg_logprob: number

Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.

formatfloat
compression_ratio: number

Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.

formatfloat
end: number

End time of the segment in seconds.

formatdouble
no_speech_prob: number

Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.

formatfloat
seek: number

Seek offset of the segment.

start: number

Start time of the segment in seconds.

formatdouble
temperature: number

Temperature parameter used for generating the segment.

formatfloat
text: string

Text content of the segment.

tokens: array of number

Array of token IDs for the text content.

TranslationVerbose object { duration, language, text, segments }
duration: number

The duration of the input audio.

formatdouble
language: string

The language of the output translation (always english).

text: string

The translated text.

segments: optional array of TranscriptionSegment { id, avg_logprob, compression_ratio, 7 more }

Segments of the translated text and their corresponding details.

id: number

Unique identifier of the segment.

avg_logprob: number

Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.

formatfloat
compression_ratio: number

Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.

formatfloat
end: number

End time of the segment in seconds.

formatdouble
no_speech_prob: number

Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.

formatfloat
seek: number

Seek offset of the segment.

start: number

Start time of the segment in seconds.

formatdouble
temperature: number

Temperature parameter used for generating the segment.

formatfloat
text: string

Text content of the segment.

tokens: array of number

Array of token IDs for the text content.