Skip to main content
POST
cURL

Which models accept this

Only a dedicated deployment of a model that transcribes, named in full as accounts/<account>/deployments/<deployment>. A bare model name returns MODEL_CAPABILITY_UNSUPPORTED.

WAV only

file must be a WAV with PCM samples (16, 24 or 32-bit), up to 25 MB and 10 minutes. Other formats return MEDIA_UNSUPPORTED; a longer or larger file returns 413 MEDIA_TOO_LARGE.

Authorizations

Authorization
string
header
required

Authorization: Bearer <your API key>. On /v1/messages, the Anthropic-style x-api-key: <your API key> header is accepted instead.

Body

multipart/form-data
file
file
required

The audio to transcribe: a WAV file (PCM, 16, 24 or 32-bit), up to 25 MB and 10 minutes. Other formats return MEDIA_UNSUPPORTED.

model
string
required

The speech-to-text deployment that transcribes the audio, accounts/{account}/deployments/{deployment}. A model name, or a deployment of a model that does not transcribe, returns MODEL_CAPABILITY_UNSUPPORTED.

Example:

"accounts/acme/deployments/asr-voice-01"

language
string

The language spoken, as an ISO-639-1 code such as en or zh. Leave it out and the model detects it.

prompt
string

Text that tells the model what it is about to hear: names, product terms, the spelling you expect. UTF-8 text, up to 64 KB.

temperature
number

Randomness when picking each word. 0 is the most repeatable and the usual choice for transcription.

Required range: 0 <= x <= 1
response_format
enum<string>
default:json

json (the default) returns an object with text and usage; text returns the transcript as plain text. Timestamped formats (verbose_json, srt, vtt) are not supported.

Available options:
json,
text
stream
boolean
default:false

Return the transcript as server-sent events as it is recognised, instead of one response at the end. The final event carries the full text and the usage.

Response

OK. With stream: true the same call answers text/event-stream instead: data-only events, a transcript.text.delta for each new piece of text, then one transcript.text.done with the full text and the usage, which ends the stream. There is no [DONE] line.

text
string
required
usage
object