Authentication
The Voicgen API uses API keys to authenticate requests. Your API key is scoped to a specific site on your account.
Get your API key
In the Voicgen dashboard, open Config → API keys (/dashboard/api-keys). Keys are shown once when created and use the prefix vg_live_.
Sending the key
Pass your API key in the X-API-Key header on every authenticated request:
Key scoping
Each API key belongs to a specific site. Requests authenticated with a key are attributed to that site's quota and analytics. You can create multiple keys per site from Config → API keys — for example, one for production and one for staging.
Rotating keys
To revoke every active key for a site and issue a new one, use Config → Sites (/dashboard/sites) and choose Rotate key on the site card. The API equivalent is POST /v1/sites/{site}/rotate-key (dashboard session auth). Older keys stop working immediately — update your server secrets with the new key.
Authentication and access errors
| HTTP | Meaning |
|---|---|
401 | Missing or invalid API key, inactive site, or subscription not allowed (e.g. trial ended). |
403 | Monthly post quota exceeded, plan restriction, or analytics quota (see message and errors). |
429 | Rate limit exceeded — see Rate limits |
Public browser/embed endpoints under /v1/public/... use domain validation instead of X-API-Key. If the site's subscription is inactive or the trial has expired, those routes may return 402 with message: "Subscription inactive" or "Trial expired".