castDocs

POST /api/episodes

Queue an episode from plain text. Audio renders in the background and publishes to the feed automatically.

Send a title and the text you want narrated. The server returns immediately with status: "queued" and starts rendering in the background. When the audio is ready, the episode publishes to your podcast's RSS feed automatically. No further calls needed.

Plain text only. No SSML, no markdown. text is capped at 15,000 characters per episode on the free tier; longer text is rejected with 413 text_too_long. Within the limit, cast0 chunks input transparently and stitches the result into one seamless episode.

Optionally add a teaser (max 500 characters): a 1-2 sentence hook spoken as a cold open at the top of the episode. The mix adapts to the podcast's music style (theme tracks play under the teaser) and works with music off too. Teaser characters count toward the per-episode and monthly limits.

Polling is optional. If you need to know when an episode is ready (to surface it in your own UI, link to the audio, etc.), call Get episode. Otherwise, fire and forget.

POST/api/episodes
AuthorizationBearer <token>

Podcast API key (pk_xxxxx)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.cast0.ai/api/episodes" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "text": "string"  }'
{
  "episode": {
    "id": "string",
    "title": "string",
    "status": "queued",
    "audioUrl": "string",
    "durationSeconds": 0,
    "error": "string",
    "createdAt": "string"
  }
}
{
  "error": "monthly_quota_exceeded",
  "message": "string",
  "quotaUsd": 0,
  "usedUsd": 0,
  "periodEnd": "string"
}
{
  "error": "text_too_long",
  "message": "string",
  "limit": 0,
  "actual": 0
}