Audio API
Use OpenAI-compatible endpoints for speech synthesis and transcription. Supported models, formats and pricing vary.
Endpoints
| Name | Type | Required | Description |
|---|---|---|---|
POST /v1/audio/speech | sync | Text-to-speech. Returns audio bytes inline. Drop-in for OpenAI /v1/audio/speech. | |
POST /v1/audio/transcriptions | sync | Speech-to-text. Returns JSON transcript inline. Drop-in for OpenAI /v1/audio/transcriptions. | |
POST /v1/jobs (model=audio) | async | Async audio job. Returns 202 with job ID. Poll GET /v1/jobs/:id. Use for long inputs or background processing. |
Text-to-Speech models
Voice options depend on the model. Check GET /v1/audio/models and the model documentation before making a request.
| Name | Type | Required | Description |
|---|---|---|---|
openai/tts-1 | tts | OpenAI text-to-speech; consult the current model page for pricing. | |
openai/tts-1-hd | tts | OpenAI high-definition text-to-speech. | |
openai/gpt-4o-mini-tts | tts | GPT-4o mini text-to-speech. | |
indexteam/indextts-2 | tts | IndexTTS-2; see the speech reference for voice options. |
Speech-to-Text models
| Name | Type | Required | Description |
|---|---|---|---|
openai/whisper-1 | stt | OpenAI Whisper transcription. | |
openai/gpt-4o-transcribe | stt | GPT-4o transcription. | |
openai/gpt-4o-mini-transcribe | stt | GPT-4o mini transcription. |
Sync vs async
The sync endpoints (/v1/audio/speech and /v1/audio/transcriptions) stream the result back inline β best for interactive or short inputs. For long audio files or batch workloads, use POST /v1/jobs with an audio model: the gateway queues the request, stores the output in S3, and returns a presigned URL when complete.
https://api.therouter.ai/v1. Test the selected model and options; support varies by route.Billing
Billing units and prices depend on the model. Consult the current model catalog before calling the API. Previously listed SenseVoice, CosyVoice2 and Fish Speech aliases are not in the current public catalog; do not assume they are available as fallbacks.