Skip to main content
OpenRouter supports audio through dedicated speech endpoints and through multimodal chat models. Choose the API that matches your use case:
  • Dedicated Speech-to-Text (POST /api/v1/audio/transcriptions): Transcribe audio files with Whisper, GPT-4o Transcribe, Deepgram, ElevenLabs Scribe, and other STT models. See the Speech-to-Text guide and discover STT models with GET /api/v1/models?output_modalities=transcription.
  • Dedicated Text-to-Speech (POST /api/v1/audio/speech): Generate speech audio (mp3 or pcm) from text with OpenAI, Gemini, ElevenLabs, Fish Audio, Voxtral, and other TTS models. See the Text-to-Speech guide and discover TTS models and voices with GET /api/v1/audio/speech/models.
  • Multimodal chat models (this page): Send audio alongside text prompts for analysis, Q&A, or reasoning, or receive conversational audio responses from audio-capable chat models.

Audio Inputs

Send audio files to multimodal chat models for analysis, Q&A, and processing alongside text prompts. For dedicated speech-to-text transcription (including multipart file uploads, inline audio, direct URLs on models that support them, and silence handling without LLM hallucination), use the Speech-to-Text endpoint (POST /api/v1/audio/transcriptions) instead. Multimodal audio input requests use the Responses API (/api/v1/responses) with the input_audio content type. Audio files must be base64-encoded and include the format specification. Note: Audio files must be base64-encoded - direct URLs are not supported for audio content. You can search for models that support audio input by filtering to audio input modality on our Models page.

Sending Audio Files

Here’s how to send an audio file for processing:
Output

Supported Audio Input Formats

The Responses API (/api/v1/responses) accepts two format values for input_audio:
  • wav - WAV audio
  • mp3 - MP3 audio
Chat Completions (/api/v1/chat/completions) accepts any format string the provider supports, such as aiff, aac, ogg, flac, m4a, pcm16, or pcm24, in the input_audio.format field of its content parts. Note: Check your model’s documentation to confirm which audio formats it supports. Not all models support all formats.

Audio Output

OpenRouter supports receiving conversational audio responses from chat models that have audio output capabilities. For dedicated text-to-speech synthesis from text with mp3 or pcm output, use the Text-to-Speech endpoint (POST /api/v1/audio/speech) instead. To request audio output from a chat model, include the modalities and audio parameters in your request. Audio output uses the Chat Completions API (/api/v1/chat/completions), because the Responses API does not accept the audio parameter. You can search for models that support audio output by filtering to audio output modality on our Models page.

Requesting Audio Output

To receive audio output, set modalities to ["text", "audio"] and provide the audio configuration with your desired voice and format:
Output

Streaming Chunk Format

Audio output requires streaming (stream: true). Audio data and transcript are delivered incrementally via the delta.audio field in each chunk:

Audio Configuration Options

The audio parameter accepts the following options: