castDocs

GET /api/episodes/{id}

Fetch a single episode by id. Use it to poll for completion when needed.

Fetch one episode by its id. Most users never need this. Once you POST an episode, cast0 publishes it to your RSS feed when rendering finishes. Use this endpoint when you need to know the current status programmatically: to surface the episode in your own UI, link to the audio, or react to failures.

The episode is finished when:

  • status = "done"
  • audioUrl is a non-null URL to the rendered MP3
  • durationSeconds is set

If status = "failed", the error field explains why. Polling every 5 to 10 seconds is plenty.

Episodes that don't belong to the authenticated podcast return 404.

GET/api/episodes/{id}
AuthorizationBearer <token>

Podcast API key (pk_xxxxx)

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://api.cast0.ai/api/episodes/string"
{
  "episode": {
    "id": "string",
    "title": "string",
    "status": "queued",
    "audioUrl": "string",
    "durationSeconds": 0,
    "error": "string",
    "createdAt": "string"
  }
}
{
  "error": "string"
}