VOCARA API · v1 · beta

A voice for your code and AI‑agents

Thousands of voices and 95 languages in a single REST request. Get a key in the Telegram bot in 10 seconds, with the same credits as in the bot. Connects to Claude Code, Codex, Cursor and other agents via MCP.

  • REST + JSON
  • MCP for agents
  • Webhooks
  • Pay only for characters
curl "$VOCARA_API_BASE/v1/speech" \
  -H "Authorization: Bearer $VOCARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello! This is VOCARA.",
    "voice": "pf92bd8",
    "wait": true
  }' -o speech.mp3
speech.mp3200 OK · Calvin Whitlock · 22 characters = 33 credits
Works with
  • Claude Code
  • Codex
  • Cursor
  • Hermes
  • OpenClaw
  • Gemini CLI
  • Windsurf
  • VS Code
  • n8n

Your first MP3 — in five minutes

No sign-up on the site, no card. The bot issues the key and the balance is shared: the 5,000 welcome credits work in the API too.

  1. Get a key in the bot

    Menu “🔑 API” → “Create key”. The key is shown once — save it to an environment variable.

  2. Send text

    One POST /v1/speech with the text and a voice code from the catalog.

  3. Get your MP3

    Short text comes back right away. Long text becomes a job: poll its status or wait for a webhook.

Give your agent a voice

The vocara-mcp MCP server turns the API into tools the agent calls on its own: it finds a voice, checks the price, voices the text and drops the MP3 into the working folder.

What the agent can do

  • list_voicesPick a voiceBy language, gender, model or description.
  • estimateCheck the priceBefore starting, free of charge.
  • speakVoice textNeo or Pro, pace, language, voice settings, file name.
  • dialogueBuild a dialogueUp to 15 roles, pauses between lines; waits for long ones by itself.
  • balanceCheck the balanceHow many credits are left.

Try telling your agent“Voice the README section in English with a male voice, show me the price first.”

# Terminal: a server for all your projects (scope user)
claude mcp add --transport stdio --scope user \
  --env VOCARA_API_KEY=vk_live_… --env VOCARA_API_BASE=… \
  vocara -- npx -y vocara-mcp

Requires Node.js 18+. MP3 files are saved to ./vocara-audio (the VOCARA_OUTPUT_DIR variable). For Claude Code, Codex and OpenClaw there is a ready-made SKILL.md skill — the bot sends it together with the key.

API reference

Everything you need to integrate: one error format, predictable limits and no hidden charges.

Authorization

Every request carries the key in the Authorization: Bearer vk_live_… header. Keys are created and revoked in the bot, in the “🔑 API” menu: up to three active keys, each with its own name (for example “Claude Code” or “Website”), with last use and 30-day spend shown.

The key is shown only once, and we store only its fingerprint. Lost it? Revoke it and create a new one. Never put the key in web page code or public repositories.

Base URL and formats

The bot shows the API base URL together with the key; in the examples it is the VOCARA_API_BASE variable. Requests and responses are JSON in UTF-8, audio is audio/mpeg (MP3, 44.1 kHz, 128 kbps). Times are ISO-8601 UTC. A voice is set by its short catalog code: v… for Neo, p… for Pro.

So that retrying after a dropped connection doesn’t charge you twice, add an Idempotency-Key header with any unique string: for 24 hours a retry returns the same job with code 200 and the Idempotent-Replayed: true header, with no second charge.

Models and pricing

Balance and rates are shared with the bot: you pay only for text characters, pause commands are free. /estimate returns the exact amount before you start; if a job fails, credits are refunded automatically.

VOCARA Neo1

credit per character · hundreds of voices, each in its own language · dialogues with up to 15 roles

VOCARA Pro1,5

credits per character · every voice speaks 94 languages · emotions via tags, voice settings

Example1,000

characters in Neo cost 1,000 credits, in Pro — 1,500. Credit packs are on the home page.

Profile and balance

GET/v1/me
{
  "user_id": 123456789,
  "balance": 20932,
  "rates": { "neo": 1.0, "pro": 1.5 },
  "limits": { "max_chars": 100000, "rpm": 60, "concurrent_jobs": 3 },
  "key": { "name": "Claude Code", "masked": "vk_live_…abcd" }
}

Voice catalog

GET/v1/voices

The same catalog as in the bot and on the voices page: names, descriptions and categories are identical (catalog texts are in Ukrainian for now). One voice — GET /v1/voices/{id}. Without model, Neo voices come first, then Pro. preview_url can be null if a voice has no preview.

ParameterDescription
modeloptionalneo or pro
langoptionalthe voice’s native language: uk, en, pl…
genderoptionalm or f
qoptionalsearch by name or description, or an exact code
limit, cursoroptionalup to 100 per page (50 by default), then next_cursor
{
  "data": [{
    "id": "v42b516",
    "name": "Зеновій",
    "model": "neo",
    "lang": "uk",
    "gender": "m",
    "tagline": "Уважний помічник",
    "tags": ["Розмовний"],
    "preview_url": "https://…/v42b516.mp3"
  }],
  "total": 89,
  "next_cursor": "50"
}

Price before you start

POST/v1/estimate

Free: how many characters, how many credits, what will remain on the balance and whether it’s enough (enough). For a dialogue, send script and roles instead of text and voice.

Request
{ "text": "Welcome", "voice": "vb5beab" }
Response
{ "chars": 7, "model": "neo", "cost": 7, "balance_after": 20925, "enough": true }

Text to speech

POST/v1/speech

By default the response is 202 with a job you collect via /jobs or a webhook. With "wait": true the server waits up to 120 seconds and returns the MP3 right away (headers X-Job-Id, X-Cost, X-Balance); if it doesn’t make it in time, you also get 202 with a job. If synthesis fails, you get an error with a job_id field, and the credits have already been refunded.

FieldDescription
textrequiredup to 100,000 characters
voicerequiredvoice code: v… (Neo) or p… (Pro)
speedslow · normal · fast
languagePro only: language code or auto
stabilityPro only, 0–1: lower is more expressive, higher is steadier
similarityPro only, 0–1: how close to the original
waittrue — MP3 right away; default false — a job
callback_urlwhere to send the result, see webhooks
Pro with emotions
{
  "text": "[whispers] It's a secret… [laughs] Just kidding!",
  "voice": "p2ea9501c",
  "language": "en",
  "stability": 0.3,
  "wait": false,
  "callback_url": "https://example.com/hooks/vocara"
}
Emotion tags in Pro: [whispers] [laughs] [sighs] [excited] [sarcastic] [shouts]. In Neo they are read out as text.

Dialogues

POST/v1/dialogues

A script with up to 15 roles in the Neo model: each line on a new row in the format Name: text, a pause after a line is {pause: 1} (not voiced and not charged). The output is a single MP3.

{
  "script": "Anna: Hi! Have you heard the news? {pause: 1}\nMark: Go on.",
  "roles": { "Anna": "v…", "Mark": "v…" },
  "speed": "normal",
  "wait": true
}

Jobs

GET/v1/jobs/{id}

Status: queued → processing → done or failed. The file is at audio_url: a link with a token that opens without the key for 24 hours. Or GET /v1/jobs/{id}/audio with the key (409 job_not_ready until the job is done). The key’s jobs for the last 30 days — GET /v1/jobs. Finished files also appear in the bot’s “My files”.

{
  "id": "job_8f3kq2",
  "status": "done",
  "kind": "speech",
  "voice": "v42b516",
  "model": "neo",
  "chars": 1240,
  "cost": 1240,
  "progress": 1.0,
  "audio_url": "$VOCARA_API_BASE/v1/files/job_8f3kq2.mp3?t=…",
  "duration_sec": 74.2,
  "error": null
}

If a job fails, status is failed, cost is 0, and error is an object { "code": "maintenance" | "synthesis_failed", "message": "…" }: credits are refunded automatically. For a dialogue there is roles instead of voice.

Webhooks

Pass a callback_url (a public https address) and you don’t need to poll the status. When the job finishes, we send a POST with the job object and the signature X-Vocara-Signature: sha256=… (HMAC-SHA256 of the body). The signing secret is derived from your API key — no need to store it separately. We wait for a 2xx response for 10 seconds; otherwise three more attempts: after 5 s, 30 s and 2 min.

import hmac, hashlib

def is_valid(body: bytes, header: str, api_key: str) -> bool:
    secret = hmac.new(api_key.encode(), b"webhook", hashlib.sha256).hexdigest()
    sig = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
    return hmac.compare_digest("sha256=" + sig, header)

Errors

The format is always the same — a human-readable explanation (in Ukrainian for now) and a request_id for support. A 402 also has need and balance, and a failed job with "wait": true has job_id:

{
  "error": {
    "code": "insufficient_credits",
    "message": "Потрібно 1 500 кредитів, на балансі 320.",
    "need": 1500,
    "balance": 320,
    "request_id": "req_2Hx9"
  }
}
CodeWhat happened and what to do
400 invalid_requestA field is missing or has the wrong type — see message.
401 invalid_api_keyNo key, or it was revoked — create a new one in the bot.
402 insufficient_creditsNot enough credits — top up your balance in the bot.
404 voice_not_foundNo such voice — check the code in the catalog. Similar: job_not_found, not_found (no such URL).
409 model_mismatchPro parameters for a Neo voice, or a dialogue with a Pro voice.
409 job_not_readyThe job’s audio isn’t ready yet — wait for done.
413 text_too_longOver 100,000 characters — split the text.
429 rate_limitedToo many requests — wait Retry-After seconds.
503 maintenanceShort maintenance — retry after Retry-After; credits were not charged or have already been refunded.
500 internal_errorA failure on our side — retry the request; if there is a job_id, the credits have been refunded.

Limits

60 requests per minute per key, 3 concurrent jobs, 100,000 characters per request, files are kept for 24 hours, job history for 30 days. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Need more? Write to support.

Key security

  • Keep the key in an environment variable or a secrets manager, not in code.
  • Requests only from a server or an agent: the API doesn’t respond to browsers, so the key never ends up on a web page.
  • A separate key for each agent or project: revoke one, the rest keep working.
  • We don’t write the voice-over text to logs — only its length. More in the privacy policy.

API questions

How much does the API cost?

The same as voice-overs in the bot: Neo is 1 credit per character, Pro is 1.5. No separate subscription or per-request fees; the balance is shared with the bot, and purchased credits never expire.

Can I try it for free?

Yes: the 5,000 welcome credits from the bot work through the API too. You can check the price of any text with /v1/estimate — it’s free.

Why does the bot issue the key instead of the website?

Your account is your Telegram: balance, payments and file history live there. That means no password or separate sign-up, and you can revoke a key from your phone in a second.

Which agents are supported?

Any with MCP support: Claude Code, Codex, Cursor, Hermes, OpenClaw, Gemini CLI, Windsurf, VS Code and others. An agent without MCP just needs an HTTP request — see the examples above.

Can I use the voice-overs commercially?

Yes, on the same terms as voice-overs from the bot: ads, videos, courses, apps. Prohibited: impersonating a real person without their consent, and the rest listed in the terms of use.

What happens if a job fails?

Credits are refunded automatically, and the job gets the failed status with an explanation. During maintenance the API responds with 503 and charges nothing.

Bubble showing how to connect the API

One key —
every voice in your code

Create a key in the bot and send your first request. 5,000 credits are already on your balance.

Get a key in Telegram