Skip to navigation

Speech to text

Transcribe an audio file and read the transcript back

POST /v1/audio/transcriptions turns an audio file into text, for when the transcript is what you need, such as indexing a call recording. To have a model reason about a recording instead, send an audio content block to a chat model.

The request is multipart/form-data. openai/whisper-1 is the transcription model in the model catalog.

curl https://api-gateway.merge.dev/v1/audio/transcriptions \
-H "Authorization: Bearer $MERGE_GATEWAY_API_KEY" \
-F "file=@standup-2026-09-01.mp3" \
-F "model=openai/whisper-1" \
-F "response_format=verbose_json"

The response is always this JSON object, whatever response_format you send:

{
"text": "Yesterday I finished the routing policy migration and today I am picking up the retry work.",
"vendor": "openai",
"language": "english",
"duration": 8.4
}

text and vendor are always present; language and duration (seconds) appear when the model reports them, which on Whisper means response_format=verbose_json.

Reference

All fields are form fields.

FieldNotes
fileRequired. The audio file.
modelRequired. A canonical model ID. @alias/... returns 400 alias_not_supported.
languageISO-639-1 code. Setting it when you know the language improves accuracy and latency.
promptText that biases spelling, such as product or attendee names
response_formatPassed to the vendor. verbose_json returns language and duration.
temperatureSampling temperature
vendorPin the execution vendor

This endpoint takes no customer field. Gateway doesn’t cap file size, so the vendor’s limit applies (25 MB on OpenAI) and an oversized file returns the vendor’s error; split or downsample long recordings.

Transcription bills per second of audio at the model’s input_per_second rate (unit: per_second on GET /v1/models). A rejected vendor credential returns 503 with code: provider_authentication_failed, and a vendor throttle returns a retryable 429 (Errors).

Next steps