KeyoAPI

Voice Cloning API — Check the Integration Contract

Reference-based speech requires the chosen model’s audio and transcript fields. A text-only request does not identify a reference speaker, and voice parameters cannot be copied between models.

Voice Cloning API 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.

Get API key Open Model Square Full pricing list Gift-credit models

Documented speech endpoints

Indicative figures for planning. Confirm live Keyo sell rates on interactive Model Square or the static pricing list.

Model IDFitKeyoAPINotes
Qwen3-TTS Array inputs; reference fields belong inside an item ~$0.548 / 10K characters POST /v1/async/audio/speech · guide the Qwen3-TTS model page
CosyVoice3 Required prompt_wav_url and exact prompt_text ~$1.37 / 10K characters POST /v1/async/audio/speech · guide the CosyVoice3 model page
IndexTTS-2 Required prompt_audio_url; separate emotion modes ~$1.37 / 10K characters POST /v1/audio/speech · guide the IndexTTS-2 model page

Before using a reference voice

Replace reference URL placeholders with real downloadable files and their exact transcripts. Index uses prompt_audio_url; Cosy uses prompt_wav_url plus prompt_text. Do not invent enrollment or reusable voice-ID fields.

Rates and endpoints

CosyVoice3 uses POST /v1/async/audio/speech with string inputs and required prompt_wav_url plus exact prompt_text. Reference audio must be at most 30 seconds, at least 16 kHz, WAV or MP3. Replace the example URL before submitting; it is not a working reference sample.

IndexTTS-2 requires prompt_audio_url. Its sync request uses input; its async request uses string inputs. Text emotion mode uses use_emo_text and optional emo_text; audio emotion mode instead requires emo_audio_prompt_url. GLM reference examples use prompt_audio_url and matching prompt_text. Step reference fields are optional and WAV-only. Full examples: the API endpoint reference.

Qwen3-TTS uses an inputs array with prompt and language in each item. Built-in speaker names are separate from reference mode; prompt_audio_url and prompt_text belong inside an array item. Spark has separate basic gender/pitch/speed and reference-audio modes. Do not replace these contracts with generic voice or reference_audio fields.

Save id/task_id and query singular GET /v1/task/{id}. On completed, inspect the actual output. Download from url or output.file_url only when present, handling batch results item by item. Preserve an unexpected complete response for support; do not automatically submit again. Retry a temporary task_query_unavailable GET according to Retry-After without creating another task. A submission timeout without an ID has an unknown outcome; do not resubmit automatically.

Style instructions and references do not guarantee a particular emotion, gender, accent or quality. These URL-based requests do not define sample enrollment or reusable voice IDs. Confirm those separate workflows with support. See the TTS API guide for endpoints, the API endpoint reference for model-specific fields and the pricing page for current rates.

# Replace the URL and transcript with your real reference (not a working sample).
curl https://www.keyoapi.xyz/v1/async/audio/speech \
  -H "Authorization: Bearer $KEYO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"CosyVoice3","inputs":"Hello from KeyoAPI TTS.","prompt_wav_url":"https://replace-me.invalid/your-reference.wav","prompt_text":"Replace with the exact transcript of your reference audio."}'
# Save id/task_id, then GET /v1/task/{id}.

Get started in five steps

  1. Create an account — new users receive $10 of gift credit for prototyping.
  2. Create an API key in the console.
  3. Point your OpenAI SDK at https://www.keyoapi.xyz/v1 with the model ID from this page, or call the dedicated REST path from the API handbook.
  4. Track spend in the console Wallet — $1 equals 500,000 quota units, and gift credit burns before recharged balance.
  5. Set a per-key spending cap before wiring production traffic.

A verified first call is the acceptance test for the setup: the response should carry the payload shape documented in the handbook, the Wallet ledger should show a deduction in quota units (500,000 units = $1), and repeated calls should deduct linearly at the listed rate. Any mismatch usually means the model ID or endpoint is wrong — check both against the pricing list before debugging client code.

FAQ

Which fields identify the reference speaker?

Index and GLM use prompt_audio_url; Cosy requires prompt_wav_url plus exact prompt_text. Qwen reference fields belong inside an inputs item. See the model-specific handbook examples.

Does a successful request guarantee a matched voice?

No. HTTP success does not establish speaker similarity, gender, emotion or audio quality. Compare the result with your actual requirements.

Can I reuse a voice ID?

These URL-based examples do not define enrollment or reusable voice IDs. Confirm that separate workflow with support before implementing it.

Also see the model comparison page, the gift-credit models page, the full pricing list, and Text to Speech · CosyVoice3 · Qwen3-TTS.