> For the complete documentation index, see [llms.txt](https://docs.fastrouter.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastrouter.ai/api-reference/audio/transcriptions.md).

# Speech to Text (Transcriptions)

## Transcribe Audio (Speech to Text)

> 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/transcriptions\\`\\>
> \- \`POST <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).\
> \
> \`\`\`bash\
> curl --request POST \\\
> &#x20; \--url <https://api.fastrouter.ai/api/v1/audio/transcriptions> \\\
> &#x20; \--header 'authorization: Bearer $FASTROUTER\_API\_KEY' \\\
> &#x20; \--header 'content-type: multipart/form-data' \\\
> &#x20; \--form model=openai/whisper-1 \\\
> &#x20; \--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:\
> \
> \| Model | Supported optional fields |\
> \| --- | --- |\
> \| \`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\_parameters\` and \`supported\_params\_details\` to 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>

````json
{"openapi":"3.1.0","info":{"title":"FastRouter API Reference","version":"1.0.0"},"tags":[{"name":"Audio","description":"Transcribe, translate, and generate audio using Whisper, ElevenLabs, and other audio models."}],"servers":[{"url":"https://api.fastrouter.ai","description":"Production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"FastRouter API Key. Get yours at https://fastrouter.ai\n\nFormat: `Authorization: Bearer YOUR_API_KEY`"}},"responses":{"UnauthorizedError":{"description":"Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.\n\nNote: the 401 error body uses `code`, `message`, `param`, and `type` (there is no `status` field), and `type` is `invalid_request_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":"string","nullable":true},"code":{"type":"string"}}}}}}}}}},"paths":{"/api/v1/audio/transcriptions":{"post":{"operationId":"createTranscription","tags":["Audio"],"summary":"Transcribe Audio (Speech to Text)","description":"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`.\n\n**Available at both:**\n- `POST https://api.fastrouter.ai/api/v1/audio/transcriptions`\n- `POST https://api.fastrouter.ai/v1/audio/transcriptions`\n\nSend 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).\n\n```bash\ncurl --request POST \\\n  --url https://api.fastrouter.ai/api/v1/audio/transcriptions \\\n  --header 'authorization: Bearer $FASTROUTER_API_KEY' \\\n  --header 'content-type: multipart/form-data' \\\n  --form model=openai/whisper-1 \\\n  --form 'file=@/path/to/recording.mp3'\n```\n\nOnly `model` and `file` are required. **Every other field is model-specific** and is forwarded only to providers that understand it:\n\n| Model | Supported optional fields |\n| --- | --- |\n| `openai/whisper-1` | `language`, `prompt`, `response_format`, `temperature`, `timestamp_granularities[]` |\n| `openai/gpt-4o-transcribe`, `openai/gpt-4o-mini-transcribe` | `language`, `prompt`, `response_format` (`json`/`text`), `temperature`, `chunking_strategy`, `include[]` |\n| `sarvam/saaras:v3` | `language_code`, `mode`, `input_audio_codec` |\n\n> **Tip:** Call **GET /api/v1/models** and inspect each model's `supported_parameters` and `supported_params_details` to see exactly which fields it accepts and the allowed values, ranges, or enums.\n\nStreaming is not supported on this endpoint yet — sending `stream=true` returns `400`.\n\n**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`.\n\nBilling 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`.\n\nOpenAI reference: https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["model","file"],"properties":{"model":{"type":"string","description":"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."},"file":{"type":"string","format":"binary","description":"Audio file to transcribe. Required. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm. Max upload size: 64 MiB (25 MB for `openai/whisper-1`)."},"language":{"type":"string","description":"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."},"prompt":{"type":"string","description":"OpenAI models. Text prompt to guide the transcription style or continue a previous segment. Can include punctuation, casing, or specific vocabulary."},"response_format":{"type":"string","enum":["json","text","srt","verbose_json","vtt"],"default":"json","description":"Output format:\n- `json` (default) — JSON with a `text` field\n- `text` — plain text only\n- `srt` — SubRip subtitle format\n- `vtt` — WebVTT subtitle format\n- `verbose_json` — JSON with metadata and timestamps\n\n`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."},"temperature":{"type":"number","minimum":0,"maximum":1,"default":0,"description":"OpenAI models. Sampling temperature (0-1). Lower values make output more focused and deterministic; higher values increase randomness."},"timestamp_granularities[]":{"type":"array","items":{"type":"string","enum":["word","segment"]},"default":["segment"],"description":"`openai/whisper-1` only. Timestamp granularities to include in the transcription. **Requires `response_format=verbose_json`.** One or both of `word` and `segment` can be specified.\n\n- `segment` (default) — segment-level start/end timestamps under `segments[]`. No additional latency.\n- `word` — word-level start/end timestamps under `words[]`. Adds extra latency.\n\nPass this as a repeated form field (e.g. `-F 'timestamp_granularities[]=word' -F 'timestamp_granularities[]=segment'`). The unbracketed `timestamp_granularities` spelling is also accepted."},"chunking_strategy":{"type":"string","description":"OpenAI `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."},"include[]":{"type":"array","items":{"type":"string","enum":["logprobs"]},"description":"OpenAI `gpt-4o-transcribe` / `gpt-4o-mini-transcribe`. Additional information to include in the response. `logprobs` returns per-token log probabilities and only works with `response_format=json`. Not supported by `whisper-1`. The unbracketed `include` spelling is also accepted."},"known_speaker_names[]":{"type":"array","items":{"type":"string"},"description":"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."},"known_speaker_references[]":{"type":"array","items":{"type":"string"},"description":"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."},"language_code":{"type":"string","description":"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."},"mode":{"type":"string","description":"Sarvam models. Provider-specific transcription mode. Forwarded verbatim to the provider when set."},"input_audio_codec":{"type":"string","description":"Sarvam models. Codec hint for the uploaded audio (e.g. `mp3`, `wav`). Forwarded verbatim to the provider when set."}}}}}},"responses":{"200":{"description":"Transcription successful","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"`response_format=json` (default). In addition to `text`, FastRouter returns a `chat_id` and merges `cost` into the `usage` object.","properties":{"text":{"type":"string","description":"Transcribed text."},"language":{"type":"string","description":"Language reported by the provider. Present for models that return one (e.g. Sarvam returns the detected `language_code`)."},"chat_id":{"type":"string","description":"FastRouter transaction ID for this request (`fr_…`)."},"usage":{"type":"object","description":"Usage for this transcription. Duration-billed models (`whisper-1`, Sarvam) report `type: \"duration\"` with `seconds`; token-billed models (`gpt-4o-transcribe`) report `type: \"tokens\"` with `input_tokens` / `output_tokens`. `cost` is always merged in by FastRouter.","properties":{"type":{"type":"string","enum":["duration","tokens"],"description":"Usage unit type."},"seconds":{"type":"number","description":"Billed audio duration in seconds. Present for `type: \"duration\"`."},"input_tokens":{"type":"integer","description":"Input tokens billed. Present for `type: \"tokens\"`."},"output_tokens":{"type":"integer","description":"Output tokens billed. Present for `type: \"tokens\"`."},"cost":{"type":"number","description":"Credits charged for this request. Always 0 for free-tier (`:free`) requests."}}}}},{"type":"object","description":"`response_format=verbose_json` (`openai/whisper-1`). The upstream body is passed through verbatim with `chat_id` and `usage.cost` merged in.","properties":{"task":{"type":"string"},"language":{"type":"string"},"duration":{"type":"number"},"text":{"type":"string"},"chat_id":{"type":"string","description":"FastRouter transaction ID for this request (`fr_…`)."},"segments":{"type":"array","description":"Segment-level timestamps. Included when `timestamp_granularities[]` contains `segment` (the default).","items":{"type":"object","properties":{"id":{"type":"integer"},"seek":{"type":"integer"},"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"tokens":{"type":"array"},"temperature":{"type":"number"},"avg_logprob":{"type":"number"},"compression_ratio":{"type":"number"},"no_speech_prob":{"type":"number"}}}},"words":{"type":"array","description":"Word-level timestamps. Included only when `timestamp_granularities[]` contains `word`.","items":{"type":"object","properties":{"word":{"type":"string","description":"The transcribed word."},"start":{"type":"number","description":"Word start time in seconds."},"end":{"type":"number","description":"Word end time in seconds."}}}}}}]}},"text/plain":{"schema":{"type":"string","description":"Plain text transcription. Returned verbatim from the provider for `response_format=text`, `srt`, and `vtt` (the upstream `Content-Type` is preserved). These formats carry no `chat_id` or `cost` — use `response_format=json` if you need them."}}}},"400":{"description":"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`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"oneOf":[{"type":"string"},{"type":"object"}],"description":"Error message string, or an error object for free-tier failures."}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"description":"The API key or project key is not authorised to use the given model."},"404":{"description":"Model not found. Returned when the base model — after stripping a `:free` suffix — is not in the catalog."},"429":{"description":"Rate limited, or the daily free-tier quota is exhausted (`free_quota_exhausted`, with `Retry-After`, `quota_limit`, `quota_used`, `reset_at`)."},"502":{"description":"Upstream provider error while transcribing.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Authentication backend temporarily unavailable."}}}}}}
````

## Translate Audio to English

> 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.

```json
{"openapi":"3.1.0","info":{"title":"FastRouter API Reference","version":"1.0.0"},"tags":[{"name":"Audio","description":"Transcribe, translate, and generate audio using Whisper, ElevenLabs, and other audio models."}],"servers":[{"url":"https://api.fastrouter.ai","description":"Production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"FastRouter API Key. Get yours at https://fastrouter.ai\n\nFormat: `Authorization: Bearer YOUR_API_KEY`"}},"responses":{"UnauthorizedError":{"description":"Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.\n\nNote: the 401 error body uses `code`, `message`, `param`, and `type` (there is no `status` field), and `type` is `invalid_request_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":"string","nullable":true},"code":{"type":"string"}}}}}}}},"RateLimitError":{"description":"Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"status":{"type":"integer"}}}}}}}}}},"paths":{"/api/v1/audio/translations":{"post":{"operationId":"createTranslation","tags":["Audio"],"summary":"Translate Audio to English","description":"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.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","model"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file to translate to English. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm. Max size: 25MB"},"model":{"type":"string","enum":["whisper-1","openai/whisper-1"],"description":"Model to use for translation. Must be 'whisper-1' or 'openai/whisper-1'"},"prompt":{"type":"string","description":"Optional: English text prompt to guide the translation style. Can help with proper nouns, acronyms, or domain-specific vocabulary."},"response_format":{"type":"string","enum":["json","text","srt","verbose_json","vtt"],"default":"json","description":"Output format:\n- json: Basic JSON with translated English text\n- text: Plain English text only\n- srt: SubRip subtitle format (English)\n- vtt: WebVTT subtitle format (English)\n- verbose_json: JSON with metadata and timestamps"},"temperature":{"type":"number","minimum":0,"maximum":1,"default":0,"description":"Sampling temperature (0-1). Lower values (e.g., 0.1) make output more focused and deterministic. Use 0 for most consistent translations."}}}}}},"responses":{"200":{"description":"Translation successful - output is in English","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"JSON format response","properties":{"text":{"type":"string","description":"Translated English text"}}},{"type":"object","description":"Verbose JSON format response","properties":{"task":{"type":"string"},"language":{"type":"string","description":"Source language detected"},"duration":{"type":"number"},"text":{"type":"string","description":"Full translated English text"},"segments":{"type":"array","description":"Time-segmented translations","items":{"type":"object","properties":{"id":{"type":"integer"},"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string","description":"Segment translated to English"}}}}}}]}},"text/plain":{"schema":{"type":"string","description":"Plain English text translation"}}}},"400":{"description":"Bad Request - Invalid file format or parameters"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"413":{"description":"Payload Too Large - File exceeds 25MB limit"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"description":"Internal Server Error"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fastrouter.ai/api-reference/audio/transcriptions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
