Text to Speech API on KeyoAPI — IndexTTS-2, ElevenLabs & Async TTS
Choose the model’s endpoint and complete request fields: Qwen uses prompt/language arrays; CosyVoice and Index require reference audio; Gemini uses native generateContent.
Text to Speech API on KeyoAPI is a model-family pricing lane on KeyoAPI — a prepaid AI API gateway where one Bearer key and one wallet ($1 = 500,000 quota units) cover chat, speech, vision, OCR and video models.
TTS models on Keyo
| Model ID | Shape | KeyoAPI | Notes |
|---|---|---|---|
IndexTTS-2 |
Reference-based speech; prompt_audio_url required | ~$1.37 / 10K characters | POST /v1/audio/speech · guide the IndexTTS-2 model page |
CosyVoice3 |
Async speech; prompt_wav_url and exact prompt_text required | ~$1.37 / 10K characters | POST /v1/async/audio/speech · guide the CosyVoice3 model page |
Qwen3-TTS |
Async speech; inputs array with prompt and language | ~$0.548 / 10K characters | POST /v1/async/audio/speech · guide the Qwen3-TTS model page |
gemini-3.8-flash-tts |
Native JSON audio: decode according to inlineData.mimeType | ~$0.44 / $8.82 per 1M in/out | Only POST /v1beta/models/gemini-3.8-flash-tts:generateContent · not /v1/audio/speech · guide the gemini-3.8-flash-tts model page |
eleven-v4 |
Sync high-fidelity TTS — billed per input character | $80 / 1M characters | POST /v1/audio/speech · guide the eleven-v4 model page |
eleven-v4-turbo |
Sync low-latency TTS — billed per input character | $40 / 1M characters | POST /v1/audio/speech · guide the eleven-v4-turbo model page |
Prototype on gift-credit chat, then meter TTS
Gift-credit chat twins (Atria-dawn-v2:free and other :free catalog IDs, billed from your $10 welcome credit) sit on the same key for script drafting. TTS rows above are metered — confirm live rates on Model Square. Guides: the IndexTTS-2 model page, the CosyVoice3 model page, the Qwen3-TTS model page.
Rates and endpoints
TTS models do not share one interchangeable request body. GLM-TTS, Step-Audio-TTS-3B, IndexTTS-2 and Eleven use POST /v1/audio/speech. Qwen3-TTS, CosyVoice3 and Spark-TTS-0.5B use POST /v1/async/audio/speech, then singular GET /v1/task/{id}.
Qwen3-TTS requires an inputs array of objects containing prompt and language (Chinese or English); speaker and instruction are optional model-specific controls. CosyVoice3 requires string inputs plus prompt_wav_url and its exact prompt_text, with a reference ≤30 seconds, ≥16 kHz, WAV/MP3. IndexTTS-2 requires prompt_audio_url and a chosen text/audio emotion branch. See the API endpoint reference for complete examples.
GLM reference examples use prompt_audio_url plus its matching prompt_text; Step references are optional WAV. There is no confirmed interchangeable alloy/echo voice list for these models. Spark basic synthesis explicitly supplies gender, with pitch and speed from one to five. Eleven uses model-specific built-in names such as george; do not copy another service’s voice ID. Request success does not guarantee language, gender, emotion or voice quality.
Gemini 3.8 Flash TTS uses only POST /v1beta/models/gemini-3.8-flash-tts:generateContent, not /v1/audio/speech. Its JSON response contains inlineData.mimeType and base64 data; decode audio according to MIME and wrap raw PCM when needed. See the API endpoint reference for the decoder. The preview TTS model and keyo-tts remain pending; laya is not TTS and InfiniteTalk needs existing audio.
Replace reference URL placeholders with real downloadable files and exact transcripts before submitting. Save task IDs; retry temporary task_query_unavailable GETs according to Retry-After without creating replacement jobs. Check current rates and account groups on the pricing page.
curl https://www.keyoapi.xyz/v1/async/audio/speech \
-H "Authorization: Bearer $KEYO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"Qwen3-TTS","output_format":"mp3","inputs":[{"prompt":"Hello from KeyoAPI TTS.","language":"English","speaker":"Vivian"}]}'
# Save id/task_id, then GET /v1/task/{id}.
Get started in five steps
- Create an account — new users receive $10 of gift credit for prototyping.
- Create an API key in the console.
- Point your OpenAI SDK at
https://www.keyoapi.xyz/v1with the model ID from this page, or call the dedicated REST path from the API handbook. - Track spend in the console Wallet — $1 equals 500,000 quota units, and gift credit burns before recharged balance.
- Set a per-key spending cap before wiring production traffic.
FAQ
Which TTS model should I start with?
Use the complete model-specific request in the API endpoint reference: Qwen requires a prompt/language array; Cosy and Index need reference audio. Choose sync or async based on your application, and check live rates on the pricing page.
Is there a free TTS model?
Spark-TTS-0.5B:free is listed as a gift-credit TTS ID. The :free suffix does not promise every model has a zero rate; check the current per-model rate and wallet fallback rules. See the gift-credit models page and the CosyVoice3 model page.
Can I pair TTS with avatars?
Yes — generate audio, then drive Duix-Avatar or InfiniteTalk on the same key. Guides: the Duix-Avatar model page, hub the AI avatar video generator page.