Endpoint
Request
Headers
string
required
Must be
multipart/form-datastring
required
The AI provider to use (e.g.,
openai)string
required
Your API key for the specified provider
Form Parameters
file
required
The audio file to translate. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm. File size limit: 25 MB.
string
required
The model to use for translation (e.g.,
whisper-1)string
Optional text to guide the model’s style or continue a previous audio segment. The prompt should be in English.
string
default:"json"
Format of the response:
json, text, srt, verbose_json, or vttnumber
default:0
Sampling temperature between 0 and 1
Response
JSON Format (default)
string
The translated text in English
Verbose JSON Format
string
Type of task (
translate)string
Source language detected
number
Duration of audio in seconds
string
The translated text in English
array
Array of translation segments with timestamps
Examples
Basic Translation
Response
Python SDK
JavaScript SDK
Verbose JSON with Metadata
SRT Subtitles in English
VTT Subtitles
With Context Prompt
Batch Translation
Compare Transcription vs Translation
Real-time Translation Pipeline
Detect Language and Translate
Difference from Transcription
- Transcription: Converts speech to text in the same language
- Translation: Converts speech from any language to English text
Supported Source Languages
Whisper can translate from 90+ languages to English, including:- Spanish, French, German, Italian, Portuguese
- Chinese, Japanese, Korean, Hindi, Arabic
- Russian, Turkish, Polish, Dutch, Swedish
- And many more…
Best Practices
- Audio Quality: Use clear audio for better translation accuracy
- File Size: Keep files under 25 MB (split longer audio if needed)
- Use Prompts: Provide English context for technical terms
- Format Selection: Use
verbose_jsonto see source language detected - Batch Processing: Process multiple files efficiently
Use Cases
- International Content: Translate foreign podcasts and videos to English
- Multilingual Meetings: Convert non-English meetings to English transcripts
- Customer Support: Translate customer calls from various languages
- Language Learning: Create English versions of foreign language content
- Media Localization: Generate English subtitles for foreign videos
- Research: Translate interviews and recordings for analysis