Create Translation
Create Translation
POST /v1/audio/translations
Translates non-English audio into English text.
Request
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Audio file (max 25MB). Formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm |
model | string | Yes | whisper-1 (OpenAI), groq/whisper-large-v3 (Groq), or groq/whisper-large-v3-turbo (Groq) |
prompt | string | No | Optional text to guide style (in English) |
response_format | string | No | json (default), text, srt, verbose_json, vtt |
temperature | number | No | 0 to 1. Default 0. |
Example
curl -X POST "https://api.osmapi.com/v1/audio/translations" \
-H "Authorization: Bearer $OSM_API_KEY" \
-F file=@spanish_audio.mp3 \
-F model=whisper-1Response
{
"text": "Hello, this is the English translation."
}Response Headers
| Header | Description |
|---|---|
x-request-id | Unique request identifier |
x-osm-response-cost | Request cost in USD |
How is this guide?