Enterprise plan required
REST API access is available on the Enterprise plan. Includes full API access, higher rate limits, and dedicated support.

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_.

Keep your key secretNever expose your API key in client-side code, public repositories, or browser requests. Always make API calls from your server.

Sending the key

Pass your API key in the X-API-Key header on every authenticated request:

curl
curl https://api.voicgen.io/v1/audio/generate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: vg_live_your_key_here" \
  -d '{ "post_id": "123", "content": "Your article text here (at least fifty characters)..." }'

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

HTTPMeaning
401Missing or invalid API key, inactive site, or subscription not allowed (e.g. trial ended).
403Monthly post quota exceeded, plan restriction, or analytics quota (see message and errors).
429Rate 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".