Audio
Audio input, transcription, translation, and speech output through compatible OpenAI-style routes.
https://onerouter.com/v1/audio/speechTroubleshooting
Errors carry an HTTP status and a JSON error body. See Errors & Retries for the full list.
Supported models
Speech and transcription support is model-specific — e.g. openai/gpt-audio for speech. See the Audio Models page for the current lineup.
Overview
The audio routes are compatible with OpenAI's audio API. Use /v1/audio/speech to synthesize speech from text (the response is an audio file), /v1/audio/transcriptions to convert speech to text, and /v1/audio/translations to translate spoken audio into English text. Audio-capable chat models can also accept input_audio content parts. Transcription and translation use multipart/form-data to upload the file; text-to-speech uses JSON.
Request headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string · required | required | Bearer token, formatted as `Bearer YOUR_API_KEY`. |
| Content-Type | string · required | required | `application/json` for speech; `multipart/form-data` for transcription/translation. |
Routes
| Parameter | Type | Required | Description |
|---|---|---|---|
| /v1/audio/speech | POST | optional | Text-to-speech for compatible speech models. |
| /v1/audio/transcriptions | POST | optional | Transcribe audio when the upstream model supports it. |
| /v1/audio/translations | POST | optional | Translate audio when supported upstream. |
| Chat audio input/output | feature | optional | Some chat models accept `input_audio` content parts or return streamed audio chunks. |
Text-to-speech body
| Parameter | Type | Required | Description | Values |
|---|---|---|---|---|
| model | string | required | Speech model ID, e.g. `openai/gpt-audio`. | |
| input | string | required | The text to synthesize into audio. | |
| voice | string | optional | Voice preset, e.g. `alloy`, `verse` (model-dependent). | |
| response_format | string | optional | Audio container: `mp3`, `wav`, `opus`, `flac`, or `pcm`. | mp3wavopusflacpcm |
| speed | number | optional | Playback speed multiplier when supported (e.g. 0.5–2.0). |
Transcription body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | required | Transcription model ID. |
| file | binary | required | Audio file to transcribe (multipart/form-data). Common formats: mp3, wav, m4a, webm. |
| language | string | optional | ISO-639-1 language hint to improve accuracy. |
| response_format | string | optional | Output: `json`, `text`, `srt`, `verbose_json`, or `vtt`. |
Billing
Audio billing may depend on audio duration, generated speech length, model, or upstream unit pricing. Token usage can appear in responses for some audio-capable language models, but it is not the only billing unit for audio products.