Text-to-Speech API
Natural open-weight voices on the OpenAI /v1/audio/speech endpoint. Send text, get an mp3 back. Billed per character, no subscription, no daily cap.
Models
| Model | Voices | Languages | Price | Measured speed | Status |
|---|---|---|---|---|---|
| Kokoro 82M Hexgrad | 54 voices | 8 languages | $5.20 / 1M chars | 0.84 s for 300 chars | Available |
| Orpheus 3B Canopy Labs | 8 voices | English | $19.50 / 1M chars | 58.5 s for 300 chars | Available |
Quickstart
Set INFERENCE_API_KEY from the API Keys page. The request is the OpenAI speech request; only the base URL changes.
curl https://api.inferenceapis.com/v1/audio/speech \
-H "Authorization: Bearer $INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "hexgrad/Kokoro-82M", "input": "Hello from the text to speech API.", "voice": "af_heart", "response_format": "mp3"}' \
--output hello.mp3import os
from openai import OpenAI
client = OpenAI(base_url="https://api.inferenceapis.com/v1", api_key=os.environ["INFERENCE_API_KEY"])
audio = client.audio.speech.create(model="hexgrad/Kokoro-82M", voice="af_heart", input="Hello from the text to speech API.")
audio.write_to_file("hello.mp3")Full parameters, the voice list and Node.js examples are on the Kokoro and Orpheus pages.
Pricing versus alternatives
Per one million characters of input (about 11 hours of speech). External prices are public list rates as of September 2026.
| Provider / model | Price per 1M characters | Notes |
|---|---|---|
| Inference APIs — Kokoro 82M | $5.20 | 54 voices, 8 languages, Apache-2.0 |
| Inference APIs — Orpheus 3B | $19.50 | Expressive English, emotion tags; slow generation (see model page) |
| OpenAI tts-1 | $15.00 | 11 voices; tts-1-hd is $30.00 |
| OpenAI gpt-4o-mini-tts | ≈ $12.00 | Priced per token; OpenAI estimates ≈ $0.015 per minute of audio |
Side-by-side pages: Kokoro vs OpenAI tts-1, Kokoro vs Orpheus.
What people build with it
- Voice for assistants and agents — reply audio from an OpenAI-compatible pipeline without an ElevenLabs subscription.
- Read-aloud and accessibility — articles, notifications, in-app narration in eight languages.
- Batch narration — course content, product descriptions, audio versions of documentation at a few dollars per million characters.
Frequently asked questions
Is it compatible with the OpenAI speech API?
Yes. The endpoint is POST /v1/audio/speech with the same fields (model, input, voice, response_format, speed). The official OpenAI SDKs work by setting base_url; tts-1 is accepted as an alias for Kokoro.
What audio formats are returned?
mp3 (default), wav, or raw PCM. The response body is the audio bytes with the matching Content-Type.
Which languages and voices are available?
Kokoro ships 54 voices across American and British English, Japanese, Mandarin, Spanish, French, Hindi, Italian and Portuguese. Orpheus has 8 expressive English voices. Voice ids are listed on each model page and via GET /v1/voices?model=….
How is it billed?
Per character of input text at the rate on the pricing page — no per-request fee, no monthly plan. The X-Usage-Characters response header reports the metered count.
Can I use the audio commercially?
Kokoro 82M and Orpheus 3B are released under Apache-2.0, which permits commercial use of the generated audio. Check the model licenses for details.
Is there a free tier or a daily cap?
New accounts receive free credit to test. There is no daily cap: usage is limited only by your prepaid balance.
Is streaming supported?
Requests are processed and returned as a complete file. For short inputs Kokoro returns in well under a second (see measured speed), which is fast enough for most interactive uses; true chunked streaming is on the roadmap.
