Skip to main content
OpenRouter supports speech-to-text (STT) via a dedicated /api/v1/audio/transcriptions endpoint. Send base64-encoded audio and receive a JSON response with the transcribed text and usage statistics.

Model Discovery

You can find STT models in several ways:

Via the API

Use the output_modalities query parameter on the Models API to discover STT models:

On the Models Page

Visit the Models page and filter by output modalities to find models capable of audio transcription. You can also browse the Speech-to-Text collection for a curated list.

API Usage

Send a POST request to /api/v1/audio/transcriptions with a JSON body containing base64-encoded audio. The response is JSON with the transcribed text and optional usage statistics.

Basic Example

Request Parameters

OpenAI-Compatible Multipart Requests

The endpoint also accepts OpenAI-style multipart/form-data requests, so clients built for OpenAI’s /v1/audio/transcriptions (including the official OpenAI SDKs) work by pointing their base URL at https://openrouter.ai/api/v1:
OpenAI SDK (Python)
cURL (multipart)
The file, model, language, temperature, response_format, and timestamp_granularities fields are supported. prompt is accepted but ignored. response_format may be json (the default) or verbose_json (see Verbose Transcripts). text, srt, and vtt are rejected with a 400. With verbose_json, pass timestamp_granularities[]=word to also receive word-level timestamps in the words array. Multipart uploads are limited to 25 MB, the same cap OpenAI enforces. For compressed formats this covers long recordings, roughly 26 minutes of 128 kbps MP3, 52 minutes at 64 kbps, or over 2 hours of 24 kbps Opus voice notes. Uncompressed WAV fills the cap much faster (about 13 minutes at 16 kHz mono); prefer mp3 or opus for long recordings. Larger files should be sent as base64 JSON via input_audio, which supports streaming offload. Recordings longer than about a minute of processing time should be split anyway, since upstream providers time out after 60 seconds per request.

Provider-Specific Options

Pass provider-specific parameters through provider.options, keyed by the provider slug from the endpoints API. Only the options for the provider that serves the request are forwarded, and they are sent under the provider’s own field names, so use the names and shapes from that provider’s transcription API reference. Parameters that OpenRouter normalizes across providers (language, temperature, response_format, timestamp_granularities) stay at the top level of the request.
To find the slug for each provider serving a model, call the endpoints API. The tag field of each endpoint record is the key to use under provider.options:
Features a provider exposes only through its own options, such as speaker diarization, vocabulary or keyword hints, and output style controls, are passed this way. Provider integrations differ in which fields they forward and how they handle unsupported fields. Some forward only an allowlist and drop the rest without an error (for example Deepgram accepts punctuate, diarize, smart_format, and detect_language), while others such as Azure forward most fields as-is, so an invalid option usually surfaces as a provider error. Use the options shown in this guide, or test an option before relying on it.

Verbose Transcripts (Timestamps and Speakers)

Set response_format to verbose_json to request structured fields such as language, duration, and a segments array with start and end times (OpenAI-compatible providers also return task). Which of these fields are present varies by provider. Add "word" to timestamp_granularities to also request a words array. Providers that do not return structured output reject verbose_json with a 400, as do some individual models (for example openai/gpt-4o-transcribe and microsoft/mai-transcribe-1.5). Speaker diarization is enabled through the provider’s own option under provider.options (see Provider-Specific Options). When the provider returns speaker labels, each segment (and word, where the provider supports it) carries a speaker index. This example enables diarization on the azure endpoint of microsoft/mai-transcribe-2:
cURL
Response (abridged)
Whether speaker labels appear on segments, words, or both depends on the provider. Azure labels each phrase, and OpenRouter applies that label to the segment and to each word within it. Other providers’ diarization options (for example Deepgram’s diarize) are passed the same way under their provider slug.

Response Format

The STT endpoint returns a JSON response with the transcribed text:

Response Fields

Response Headers

Supported Audio Formats

Supported audio formats vary by provider. Common formats include:

Pricing

STT models use different pricing strategies depending on the provider:
  • Duration-based (e.g., OpenAI Whisper): Priced per second of audio input
  • Token-based (e.g., newer OpenAI models): Priced per input/output token, similar to text models
You can check the cost for each model on the Models page or via the Models API. The usage.cost field in the response shows the actual cost for each request.

BYOK (Bring Your Own Key)

STT supports BYOK, allowing you to use your own provider API keys. When configured, requests are routed directly to the provider using your key, and OpenRouter charges only its platform fee rather than the per-usage model cost.

Playground

You can test STT models directly in the browser using the OpenRouter Playground. Navigate to any STT model’s page and use the playground tab to upload an audio file and see the transcription result.

Differences from Audio Input

OpenRouter supports two ways to process audio:
  1. Speech-to-Text (this page): A dedicated /api/v1/audio/transcriptions endpoint optimized for transcription. Returns structured JSON with the transcribed text and usage data. Best for converting audio to text.
  2. Audio input via Chat Completions (Audio docs): Send audio as part of a /api/v1/chat/completions request using the input_audio content type. The model processes the audio alongside text and responds conversationally. Best for audio analysis, question answering about audio content, or combining audio with other modalities.

Best Practices

  • Choose the right format: WAV provides the best quality for transcription. MP3 and other compressed formats work well but may slightly reduce accuracy for borderline audio
  • File size: For very long audio files, consider splitting them into smaller segments. The upstream provider timeout is 60 seconds, so very large files may time out
  • Base64 encoding: Audio must be sent as base64-encoded data (raw bytes, not a data URI). Most programming languages have built-in base64 encoding utilities

Troubleshooting

Empty or incorrect transcription?
  • Verify the audio format matches the format field in your request
  • Ensure the audio quality is sufficient for transcription
Request timing out?
  • Large audio files may exceed the 60-second timeout. Split long recordings into smaller segments
  • Compressed formats (MP3, AAC) produce smaller payloads and transfer faster
Model not found?
  • Use the Models page or the Models API with output_modalities=transcription to find available STT models
  • Verify the model slug is correct (e.g., openai/whisper-1, not whisper-1)
Authentication error?
  • Ensure you’re using a valid API key from your OpenRouter dashboard
  • The STT endpoint uses the same authentication as the Chat Completions API