VoiceSmiths API: Text to Speech, Dialogue, Sound Effects, Audio Drama
The VoiceSmiths API: text to speech, multi-voice dialogue, AI sound effects, and a whole story cast and performed as a full-cast audio drama. API credits are sold separately from $49, at 1.7× the website price, failures refunded. Auth, endpoints, errors, code.
Last updated: 2026-11-29
The VoiceSmiths API gives you four things from code: text to speech, multi-voice dialogue, AI sound effects, and whole audio dramas: send a story or a script and it finds the narrator and every character, gives each a voice, performs every line with its emotion, and returns a full-cast MP3 with a timed script and SRT subtitles. Your text is never rewritten. It is the same pipeline as the audio drama studio and the voice workbench on the site.
Pricing
API credits are sold separately from the website's credits:
| API pack | Card (USD) | Alipay / WeChat Pay |
|---|---|---|
| Starter | $49 · 21,000 credits | ¥99 · 1,000 credits |
| Standard | $149 · 65,000 credits | ¥299 · 3,100 credits |
| Volume | $499 · 220,000 credits | ¥999 · 10,500 credits |
- Buy them on the pricing page or under Settings → API keys. One-time, no subscription, never expire; no new-user price on API packs.
- Website credits can't call the API, and API credits can't generate on the website. The two balances are shown separately.
- A call costs 1.7× the credits of the same work on the website, rounded up per call:
| Endpoint | Website | API |
|---|---|---|
| Text to speech (standard) | 7 per 100 characters | about 11.9 per 100 characters |
| Text to speech (fast) | 4 per 100 characters | about 6.8 per 100 characters |
| Dialogue | 7 per 100 characters | about 11.9 per 100 characters |
| Sound effect | 15 each | 26 each |
| Audio drama | 7 per 100 characters | about 11.9 per 100 characters |
- For example, the $49 pack's 21,000 credits cover about 176,000 characters of standard speech.
- Failed generations are refunded automatically; audio drama chapters not started can be canceled at no cost, and
dry_runquotes a drama first.
Before you start
- Sign up and buy an API pack.
- Create a key under Settings → API keys (it looks like
sk_…). It is shown once; keep it server-side. - Send it on every request:
Authorization: Bearer sk_your_key.
Base URL: https://voicesmiths.com/api/v1. Requests and responses are JSON, always { "code": 0, "message": "ok", "data": … }; on errors code is -1, message is the error code, and the HTTP status says the same (see the error table).
1. Voices: GET /api/v1/voices
The voices you can use: id (pass this), name, gender, age, language (en, zh, ja …) and a description. Add ?language=en for one language. Hear every voice in the voice library.
2. Text to speech: POST /api/v1/tts
| Field | Type | Notes |
|---|---|---|
text | string | Up to 5,000 characters. Emotion tags such as [whispers] or [angry] direct a line. |
voice | string | A voice id from the voice list. |
model | string | standard (default, most expressive) or fast (quicker, cheaper). |
speed | number | 0.7–1.2, optional. |
curl https://voicesmiths.com/api/v1/tts \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{"text": "Welcome back to the show.", "voice": "george"}'
Synchronous: { "id", "audio_url", "duration_seconds", "characters", "credits", "balance" }.
3. Dialogue: POST /api/v1/dialogue
turns is a list of lines: [{ "voice": "brian", "text": "Where did you hide the chip?" }, { "voice": "jessica", "text": "[nervous] I can explain…" }], up to 3,000 characters in all, rendered as one take. Returns the same as text to speech.
4. Sound effects: POST /api/v1/sound-effects
| Field | Type | Notes |
|---|---|---|
text | string | A description, up to 450 characters, e.g. "distant thunder on a rainy night, water dripping from the eaves". |
duration_seconds | number | 0.5–30, optional; chosen for you when left out. |
loop | boolean | Make it loop seamlessly, optional. |
Returns { "id", "audio_url", "credits", "balance" }.
5. Audio drama: POST /api/v1/dramas
Send a story or script; it queues on our servers, the cast is found first, then the lines are performed. Poll the job for progress.
| Field | Type | Notes |
|---|---|---|
text | string | The whole story or script. Over 8,000 characters it is split at paragraphs into chapters of about 7,500 characters at most, up to 50. Send this or chapters. |
chapters | array | Your own chapters: [{ "title": "Chapter 1", "text": "…" }], at most 8,000 characters each, up to 50. |
title | string | Book or job name, optional. Jobs with the same title keep the same voices, so a serial sounds the same chapter after chapter. |
ai_notice | boolean | End each chapter with a spoken "This audio was generated by AI." Default true. The file's metadata carries an AI-generated label either way. |
dry_run | boolean | true returns the estimated credits and your API balance; nothing is charged or queued. |
curl https://voicesmiths.com/api/v1/dramas \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{"title": "Rain", "text": "It was late. Mia pushed the door open. \"You are still up?\" Jake looked up. \"I was waiting for you.\""}'
Returns 202: { "id", "status": "queued", "estimated_credits", "balance", "chapters": [{ "index", "title", "characters" }] }. Your API balance must cover the whole job (plus chapters still waiting) when you submit it; each chapter is charged when it starts, by its actual length after analysis.
Progress and results: GET /api/v1/dramas/{id}
Poll every 5–10 seconds. Add ?include=script to also get each finished chapter's cast, its lines with timings, and SRT subtitles. Each chapter has status, credits, audio_url and duration_seconds; with include=script also cast (id, name, gender, age, voice), lines (speaker, speaker_name, text, emotions, start, end) and srt.
Job status: queued → processing → done, or partial (some chapters done), failed (none done), canceled.
Chapter status: queued, running (progress gives the parts done), done, failed (credits refunded), canceled. stopped_reason says why a chapter stopped: credits (your API balance didn't cover the next chapter; the rest is paused), failures (two chapters failed in a row), moderation (did not pass the content check), user (you canceled).
Cancel: DELETE /api/v1/dramas/{id}
Cancels every chapter not started yet, at no charge; a chapter already rendering finishes. GET /api/v1/dramas lists your jobs from the last 30 days.
6. Balance: GET /api/v1/balance
Your API credits: { "balance", "wallet": "api", "price_multiplier": 1.7 }.
Every audio_url is a direct MP3 link; download it to your own storage.
Errors
| HTTP | message | Meaning |
|---|---|---|
| 400 | INVALID_REQUEST | A field is wrong; data.field names it |
| 400 | UNKNOWN_VOICE | No such voice id; see the voice list |
| 400 | TEXT_TOO_LONG / CHAPTER_TOO_LONG / TOO_MANY_CHAPTERS | Dialogue over 3,000 characters / a chapter over 8,000 / more than 50 chapters |
| 401 | MISSING_API_KEY / INVALID_API_KEY | No key / a key that doesn't exist or was deleted |
| 402 | INSUFFICIENT_CREDITS | Not enough API credits (website credits don't count); buy an API pack |
| 403 | ACCOUNT_RESTRICTED / ACCOUNT_LIMITED | The account is suspended or temporarily limited |
| 404 | NOT_FOUND | No such job for this key's account |
| 422 | CONTENT_BLOCKED | The text did not pass the content check (below); nothing charged |
| 429 | RATE_LIMITED / TOO_MANY_QUEUED | Too fast (see retry-after) / over 100 unfinished chapters queued |
| 502 | GENERATION_FAILED | Generation failed; the credits were refunded, try again |
| 503 | TRY_AGAIN_LATER | The content check is busy; retry shortly |
Limits
- Text to speech up to 5,000 characters a call, dialogue up to 3,000, sound effect descriptions up to 450.
- Audio drama: up to 8,000 characters per chapter and 50 chapters per job; up to 100 unfinished chapters queued per account; one chapter renders at a time per account, up to 60 start per day.
- Text to speech one call per 0.5 seconds per account, dialogue and sound effects one per second, drama jobs one per 2 seconds.
- Audio drama source languages: English, Chinese, Japanese.
Content rules
Everything is checked before any model sees it. Sexual content involving minors, explicit sexual content and the other content our terms prohibit is not generated, and nothing is charged. Only send text you have the rights to (your own, licensed or public domain).
Example: Python, submit an audio drama and wait
import time, requests
KEY = "sk_your_key"
H = {"Authorization": f"Bearer {KEY}"}
API = "https://voicesmiths.com/api/v1"
job = requests.post(f"{API}/dramas", headers=H, json={
"title": "Rain",
"text": open("chapter1.txt", encoding="utf-8").read(),
}).json()["data"]
while True:
time.sleep(8)
d = requests.get(f"{API}/dramas/{job['id']}", headers=H).json()["data"]
if d["status"] not in ("queued", "processing"):
break
for ch in d["chapters"]:
if ch["audio_url"]:
open(f"{ch['index']:03d}.mp3", "wb").write(requests.get(ch["audio_url"]).content)
Questions or higher limits: email voicesmiths@163.com or open a ticket under Settings → Tickets.