Core features
Speech to text
Transcribe audio files to text using the transcriptions endpoint.
POST
/v1/audio/transcriptions
Transcribes an audio file into the spoken language using the deployed ASR model.
Request
Send multipart/form-data — do not use application/json for this endpoint.
| Field | Type | Required | Notes |
|---|---|---|---|
file | file | Yes | Audio file. Supported formats and the maximum file size depend on the deployed ASR model (commonly flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm). |
model | string | Yes | An ASR model id from your catalog, e.g. myt ASR. |
language | string | No | ISO-639-1 language code (e.g. en, fr). Omit to auto-detect. |
prompt | string | No | Optional context or spelling hints to guide the model. |
response_format | string | No | json (default), text, and other formats where the model supports them (e.g. srt, verbose_json, vtt). |
temperature | number | No | Sampling temperature, where supported. |
Example request (curl)
curl -sS --request "POST" \
--url "$MYT_BASE_URL/audio/transcriptions" \
--header "Authorization: Bearer $MYT_API_KEY" \
-F "model=myt ASR" \
-F "language=en" \
-F "file=@/path/to/recording.wav"Response (json format)
{
"text": "The quick brown fox jumps over the lazy dog."
}Response (verbose_json format, where supported)
{
"task": "transcribe",
"language": "english",
"duration": 4.32,
"text": "The quick brown fox jumps over the lazy dog.",
"words": [
{ "word": "The", "start": 0.00, "end": 0.18 },
{ "word": "quick", "start": 0.18, "end": 0.40 }
]
}Errors
| Status | When |
|---|---|
400 | File missing, unsupported format, or exceeded size limit |
401 | API key missing or invalid |
429 | Rate limit or budget exceeded |
Code examples
curl -sS --request "POST" \
--url "$MYT_BASE_URL/audio/transcriptions" \
--header "Authorization: Bearer $MYT_API_KEY" \
-F "model=myt ASR" \
-F "file=@/path/to/audio.wav"Full parameter reference: Audio transcriptions.