TTS 400 asking for voice.id or avatar_id / avatar_handle: the fix
The TTS call needs a voice: set voice.id, or a top-level avatar_id or avatar_handle. Without one the request is rejected before any audio is made.
The message begins Provide voice.id, or the top-level avatar_id / avatar_handle. Your TTS request named no voice. Add voice.id, or add avatar_id or avatar_handle at the top level, and send it again.
Two ways to name a voice
| Field | Where | Use |
|---|---|---|
| voice.id | Inside voice | A voice id |
| avatar_id | Top level | An avatar's voice by id |
| avatar_handle | Top level | An avatar's voice by handle |
Example with a voice id
Replace YOUR_VOICE_ID with an id you own.
curl -X POST https://api.sume.com/v1/tts-1.0/generate \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: tts-voice-001" \
-d '{"transcript": "Welcome back.", "voice": {"id": "YOUR_VOICE_ID"}}'Related checks
- An unknown voice id returns a different error from a missing one.
- Use the TTS Router at /v1/tts-router/generate with a model such as sonic-3.5 when you want to pick the engine; its catalog is at /v1/tts-router/models.
- Speed takes slow, normal or fast.
Cost
A successful 14-character line costs 14 x $0.0475 / 1,000 = $0.000665.
Sources
Related posts
More in Developers
- List Sume TTS Router models before you hardcode a Sonic id
GET /v1/tts-router/models returns the catalog of pass-through TTS models. Read it at startup instead of pinning an id that may change.
- Voice replication API audit checklist before you switch
Gemini 3.8 Flash TTS is GA with voice replication and 150+ voices. Before switching providers, audit these items against Sume's live catalog.
- Reuse TTS word timestamps as caption words, skip a second STT
You already know what the voice said and when. Feed the TTS word timings to the caption job as `words` so brand names are never misheard by speech-to-text.
- A "use step" function that submits a Sume job once
Put the Sume submit call inside one "use step" function and derive the Idempotency-Key from a stable run key, so a retried step returns the original job.
Written by Sume