Audio & Realtime
Create Translation
Translates audio into English text
Overview
Translates audio in any supported language into English text. Unlike transcription, this endpoint always outputs English text regardless of the input language.
This endpoint translates audio into English. Do not send language; it is not supported for audio translation and can return unsupported_parameter. For text translation, use POST /v1/translations; recommended_for=translation refers to that text API.
Request Body
Translation returns when processing finishes. For longer audio, allow an HTTP client timeout of at least 120s.
The audio file to translate. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm. Maximum file size is 25 MB.
whisper-1Audio translation model ID, such as whisper-1. Confirm that its current model details support POST /v1/audio/translations.
An optional text to guide the model's style or continue a previous segment. Should be in English.
jsonOutput format. Whisper supports json, text, srt, verbose_json, and vtt; other models may support a different subset. Check the selected model's details.
Sampling temperature from 0 to 1, only for models that support this parameter.
Response
The fields below describe JSON transcript or translation responses. text, srt, and vtt return raw text or subtitles rather than a JSON object. Additional fields depend on the model and output format.
The translated text in English.
For verbose_json format, the response also includes:
Language label reported in the response, when provided.
The duration of the input audio in seconds.
Segments of the translated text with timestamps.
Request
curl -X POST "https://api.tokenlab.sh/v1/audio/translations" \
-H "Authorization: Bearer sk-your-api-key" \
-F "file=@german_audio.mp3" \
-F "model=whisper-1"Response
{
"text": "Hello, my name is Wolfgang and I come from Germany. Where are you from?"
}Translation vs Transcription
| Feature | Translation | Transcription |
|---|---|---|
| Output language | Always English | Same as input |
| Use case | Convert foreign audio to English | Preserve original language |
| Language parameter | Not applicable | Optional hint |
Authorization
BearerAuth API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
Headers
Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Verified first and may switch once to Official only before output, request acceptance, or persistent resource creation.
Value in
- "auto"
- "verified"
- "official"
Request Body
multipart/form-data
Response
application/json
application/json
application/json
application/json
application/json
application/json