Enterprise plan required
REST API access is available on the Enterprise plan. Includes full API access, higher rate limits, and dedicated support.
Generate audio
Trigger audio generation for a post. When a new job is queued, the API responds with 202 Accepted and status: "pending" — generation runs asynchronously.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Required | Your Voicgen API key Example: vg_live_xxxx |
Content-Type | string | Required | application/json |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
post_id | string | Required | Your unique identifier for this post. Used with language to load or create the audio row. Example: article-001 |
content | string | Required | HTML or plain text. Minimum 50 characters. |
post_title | string | Optional | Title of the post. Shown in the player. Example: My article title |
post_url | string | Optional | Full URL of the post. Used for analytics attribution. Example: https://yourblog.com/post |
language | string | Optional | ISO 639-1 code; must be in the server-supported set. Defaults to "en". Example: en |
voice_id | integer | Optional | Voicgen voice ID. Defaults to the site's default voice. Example: 1 |
Response
Idempotency
For the same post_id and language:
- If audio is already ready, the API returns 200 with message
Audio already existsand does not start a new generation. - If status is generating, the API returns 202 with message
Audio generation already in progress. - Otherwise a new job is queued and the API returns 202.
Error responses
| HTTP | Typical cause |
|---|---|
401 | Missing or invalid API key, or subscription not allowed |
403 | Monthly post limit reached for the plan (before queueing a new post in English) |
422 | Validation error (e.g. content too short, invalid voice_id) |
429 | Rate limit exceeded — see Rate limits |
✓
Content tipsSend HTML — processing strips tags for speech. Avoid sending only images, tables, or code blocks as the resulting audio will be very short. Minimum useful content is a few paragraphs of prose.