@taskmagic/apps-vocallab
v0.0.2
Published
Neural text-to-speech and voice cloning with [VocalLab AI](https://vocallab.ai) — API docs: https://www.vocallab.ai/help/api-reference
Readme
Vocallab AI
Neural text-to-speech and voice cloning with VocalLab AI — API docs: https://www.vocallab.ai/help/api-reference
Not to be confused with vocallabs.ai, a different company selling voice AI phone agents. This piece targets vocallab.ai, the TTS and voice-cloning studio.
Connection: an API key from Developer settings → Create key. It starts with
vl_live_ and is shown only once. API access requires the Pro plan or higher — below
that every request returns 403, and if a subscription drops below Pro existing keys go inactive
until it is upgraded. Up to 5 active keys per account; 60 requests/minute per key.
Base URL: https://api.vocallab.ai, authenticated with Authorization: Bearer <key>.
Actions
Generate Speech, Get Generation, List Voices, List Models, Get Account Balance, Delete Generation.
Generate Speech is the one that earns the piece. It returns the audio as a file the rest of the flow can attach to an email, upload, or post — not a URL the next step has to fetch.
- Text is capped at 2,000 characters. The action checks locally and names the actual length, because VocalLab's own answer is a bare 413. Split longer scripts across several steps.
- Pauses:
<break time="1.5s" />or<break time="1500ms" />, up to 20 per request. They count toward the character limit. - Voice is a searchable dropdown from
/api/v1/voices, covering the public catalogue plus the account's own clones and designs. Labels carry the category and languages, because the catalogue names are long descriptive sentences that otherwise read alike. - Model is loaded live from
/api/v1/modelsrather than hardcoded — VocalLab ships new models continuously, and a static list goes stale silently.v-prois the default,v-studiois steerable and covers 200+ languages,v-litecosts half the points. - Speed (0.5–1.5), Expressiveness (temperature, 0.7–1.5), Format, Bit Rate (MP3 and OGG Opus only) and Sample Rate are all optional; left empty, VocalLab's own defaults apply.
Waiting for the audio
POST /api/v1/tts can return the audio inline as audio_base64, or return status: "pending".
Generate Speech handles both: it decodes inline audio when present, otherwise polls
GET /api/v1/tts/:id for up to 30 seconds and then downloads the bytes. If it is still pending
after that, the error names the generation id so Get Generation can pick it up later rather
than the work being lost.
The API key never leaves VocalLab's host
The rendered audio is fetched from stream_url (VocalLab's own API) or audio_url (a hosted,
possibly CDN-signed link). The Authorization header is attached only when the URL is on
api.vocallab.ai — otherwise a signed CDN link would receive the user's API key.
Error messages likewise report only VocalLab's own {error:{message}} text plus a plain-English
hint per status (402 out of points, 403 plan lacks API access, 413 text too long, 429 rate
limit). They never fall back to the raw HttpError, whose message serialises the outgoing
request — including the Authorization header.
Points
Billing is points = ⌈ characters ÷ 15 ⌉, charged before generation; roughly 1 point per
second of audio. The API bills ~13% more than the web app (15 chars/point vs 17). v-lite costs
half. Out of points returns 402 — Get Account Balance reads the remaining balance.
No triggers in this version
The API reference documents seven endpoints and no subscription or callback mechanism, so there is nothing to build a webhook trigger against. Polling is not the fallback: the only listable resources are voices and models, which change when you change them rather than on the provider's clock, and generation status is a per-request concern that Generate Speech already waits out itself.
