Speech to Text (Transcriptions)
Transcribes an audio file to text. This is the single speech-to-text endpoint on FastRouter — it is OpenAI-compatible (same multipart form fields and the same response shapes as POST https://api.openai.com/v1/audio/transcriptions) and it also serves non-OpenAI STT models such as sarvam/saaras:v3.
Available at both:
POST https://api.fastrouter.ai/api/v1/audio/transcriptionsPOST https://api.fastrouter.ai/v1/audio/transcriptions
Send the request as multipart/form-data with the audio in the file form field. Max upload size at the gateway: 64 MiB (openai/whisper-1 additionally caps uploads at 25 MB upstream).
curl --request POST \
--url https://api.fastrouter.ai/api/v1/audio/transcriptions \
--header 'authorization: Bearer $FASTROUTER_API_KEY' \
--header 'content-type: multipart/form-data' \
--form model=openai/whisper-1 \
--form 'file=@/path/to/recording.mp3'Only model and file are required. Every other field is model-specific and is forwarded only to providers that understand it:
openai/whisper-1
language, prompt, response_format, temperature, timestamp_granularities[]
openai/gpt-4o-transcribe, openai/gpt-4o-mini-transcribe
language, prompt, response_format (json/text), temperature, chunking_strategy, include[]
sarvam/saaras:v3
language_code, mode, input_audio_codec
Tip: Call GET /api/v1/models and inspect each model's
supported_parametersandsupported_params_detailsto see exactly which fields it accepts and the allowed values, ranges, or enums.
Streaming is not supported on this endpoint yet — sending stream=true returns 400.
Response shape. Providers that return an OpenAI-shaped body (the OpenAI models) are passed through verbatim, so segments, words, and logprobs survive; FastRouter merges chat_id and usage.cost into the JSON. Providers that only return a transcript (e.g. Sarvam) get an OpenAI-shaped body synthesized from the transcript, so text is always present for response_format=json.
Billing is per second of audio for duration-billed models (whisper-1, Sarvam) and per token for OpenAI's token-billed transcribe models. The :free slug and fastrouter/free free-tier routing apply here as they do on /chat/completions.
OpenAI reference: https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Speech-to-text model ID in provider/model format — e.g. openai/whisper-1, openai/gpt-4o-transcribe, sarvam/saaras:v3. The bare whisper-1 is also accepted for OpenAI SDK compatibility. Append :free to serve the request from the daily free-tier quota when the model is opted in.
openai/whisper-1Audio file to transcribe. Required. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm. Max upload size: 64 MiB (25 MB for openai/whisper-1).
OpenAI models. ISO-639-1 language code of the input audio (e.g. en, es, fr, de). Improves accuracy and latency. Sarvam models use language_code instead.
enOpenAI models. Text prompt to guide the transcription style or continue a previous segment. Can include punctuation, casing, or specific vocabulary.
Output format:
json(default) — JSON with atextfieldtext— plain text onlysrt— SubRip subtitle formatvtt— WebVTT subtitle formatverbose_json— JSON with metadata and timestamps
srt, vtt, and verbose_json are supported by whisper-1 only; gpt-4o-transcribe and gpt-4o-mini-transcribe support json and text. Sarvam models always return the json shape.
jsonPossible values: OpenAI models. Sampling temperature (0-1). Lower values make output more focused and deterministic; higher values increase randomness.
0OpenAI gpt-4o-transcribe / gpt-4o-mini-transcribe. Controls how long audio is split into chunks (e.g. auto, or a server-VAD config). Not supported by whisper-1. Forwarded verbatim to the provider when set.
OpenAI diarizing models (gpt-4o-transcribe-diarize). Names for the speakers referenced by known_speaker_references[], in the same order. Forwarded verbatim to the provider when set.
OpenAI diarizing models (gpt-4o-transcribe-diarize). Short reference audio samples (data URIs) for the speakers named in known_speaker_names[], in the same order. Forwarded verbatim to the provider when set.
Sarvam models. BCP-47 language code of the audio (e.g. hi-IN, en-IN). Forwarded to the provider when set; omit to let the provider auto-detect.
hi-INSarvam models. Provider-specific transcription mode. Forwarded verbatim to the provider when set.
Sarvam models. Codec hint for the uploaded audio (e.g. mp3, wav). Forwarded verbatim to the provider when set.
mp3Transcription successful
Bad Request — invalid multipart body, missing/unreadable file (including uploads above the 64 MiB limit), missing or unroutable model, stream=true, or a free-tier error (free_slug_disabled, no_free_model_available).
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
The API key or project key is not authorised to use the given model.
Model not found. Returned when the base model — after stripping a :free suffix — is not in the catalog.
Rate limited, or the daily free-tier quota is exhausted (free_quota_exhausted, with Retry-After, quota_limit, quota_used, reset_at).
Upstream provider error while transcribing.
Authentication backend temporarily unavailable.
POST /api/v1/audio/transcriptions HTTP/1.1
Host: api.fastrouter.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 61
{
"model": "openai/whisper-1",
"file": "(binary: recording.mp3)"
}{
"text": "Hello, this is a sample transcription of the audio file.",
"chat_id": "fr_01ABCXYZ",
"usage": {
"type": "duration",
"seconds": 2,
"cost": 0.0001
}
}Translates audio to English text using openai/whisper-1, regardless of source language. Supports MP3, MP4, MPEG, M4A, WAV, WEBM formats (max 25MB). Output formats: json, text, srt, vtt, verbose_json.
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Audio file to translate to English. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm. Max size: 25MB
Model to use for translation. Must be 'whisper-1' or 'openai/whisper-1'
whisper-1Possible values: Optional: English text prompt to guide the translation style. Can help with proper nouns, acronyms, or domain-specific vocabulary.
Output format:
- json: Basic JSON with translated English text
- text: Plain English text only
- srt: SubRip subtitle format (English)
- vtt: WebVTT subtitle format (English)
- verbose_json: JSON with metadata and timestamps
jsonPossible values: Sampling temperature (0-1). Lower values (e.g., 0.1) make output more focused and deterministic. Use 0 for most consistent translations.
0Translation successful - output is in English
Bad Request - Invalid file format or parameters
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
Payload Too Large - File exceeds 25MB limit
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
POST /api/v1/audio/translations HTTP/1.1
Host: api.fastrouter.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 84
{
"model": "whisper-1",
"file": "(binary: speech_spanish.mp3)",
"response_format": "json"
}{
"text": "Hello, this is a sample translation to English."
}Last updated
