Audio Inputs
Send audio files to compatible models for transcription, analysis, and processing. 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:Supported Audio Input Formats
The Responses API (/api/v1/responses) accepts two format values for input_audio:
wav- WAV audiomp3- MP3 audio
/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 audio responses from models that have audio output capabilities. To request audio output, include themodalities 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, setmodalities to ["text", "audio"] and provide the audio configuration with your desired voice and format:
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
Theaudio parameter accepts the following options: