Skip to main content
Two audio endpoints, both OpenAI-shaped:
  • Text-to-speech (TTS) — POST /v1/audio/speech returns audio bytes for a text input. Find models whose output_modalities includes audio.
  • Transcription (ASR) — POST /v1/audio/transcriptions returns text for an audio file upload. Find models whose input_modalities includes audio.
See model discovery for the filter snippets — text-to-speech and speech-to-text.

Text-to-speech

The example below uses Kokoro-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 catalog for the supported set, or fall back to the model’s upstream documentation.

Billing

TTS bills per input character. Read the active rate from GET /v1/pricing — find the row for your model, where pricing_type is per_character, and take unit_price_usd. A model that is temporarily not serving has no row until it is back. See also billing. The same rate is on the model’s own entry in GET /v1/models, under media_pricing, if you are already fetching that and would rather not make a second call. There the billing_unit reads character.

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

Billing

ASR bills per minute of input audio. Read the active rate from GET /v1/pricing — find the row for your model, where pricing_type is per_minute, and take unit_price_usd. A model that is temporarily not serving has no row until it is back. As with the other per-unit models, GET /v1/models carries the same rate under media_pricing on the model’s entry, so one call can do both discovery and pricing. The billing_unit there is minute_audio, not minute — the raw unit, rather than the pricing_type stem.

See also