- Text-to-speech (TTS) —
POST /v1/audio/speechreturns audio bytes for a text input. Find models withaudio_speechinsupports. - Transcription (ASR) —
POST /v1/audio/transcriptionsreturns text for an audio file upload. Find models withaudio_transcriptioninsupports.
Text-to-speech
The example below usesKokoro-82M. The response body is raw audio bytes (WAV by default) — write them straight to disk.
Voices
Voice names are model-specific — there’s no shared “Alloy/Echo/Fable/…” namespace. Check the model’sdescription on GET /api/models for the supported set, or fall back to the model’s upstream documentation.
Billing
TTS bills per input character — seepricing[] (billing_unit: "character") on GET /api/models, or billing.
Transcription
/v1/audio/transcriptions is Whisper-compatible. Send the audio file as multipart/form-data, get back a JSON { "text": "..." }. The current model is whisper-large-v3-turbo.
Request fields
| Field | Required | Notes |
|---|---|---|
file | Yes | multipart/form-data upload. WAV, MP3, M4A, FLAC, OGG. |
model | Yes | Must have audio_transcription in supports. |
language | No | ISO-639-1 code (en, fr, …). Auto-detected when omitted. |
Billing
ASR bills per minute of input audio — seepricing[] (billing_unit: "minute") on GET /api/models.
See also
- Model discovery — capability filters for
audio_speechandaudio_transcription. - OpenAI compatibility —
/v1/audio/translationsis not supported.