Audio Inputs
OpenRouter supports sending audio files to compatible models via the API. This guide will show you how to work with audio using our API.
Note: Audio files must be base64-encoded - direct URLs are not supported for audio content.
Audio Inputs
Requests with audio files to compatible models are available via the /api/v1/chat/completions API with the input_audio content type. Audio files must be base64-encoded and include the format specification. Note that only models with audio processing capabilities will handle these requests.
You can search for models that support audio 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 formats vary by provider. Common formats include:
wav- WAV audiomp3- MP3 audioaiff- AIFF audioaac- AAC audioogg- OGG Vorbis audioflac- FLAC audiom4a- M4A audiopcm16- PCM16 audiopcm24- PCM24 audio
Note: Check your model’s documentation to confirm which audio formats it supports. Not all models support all formats.