---
title: "Create an asynchronous Cast render"
method: POST
path: "/v1/cast/render_jobs"
tags: ["Cast"]
---

# Create an asynchronous Cast render

`POST /v1/cast/render_jobs`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/cast/render_jobs`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Submit narration as script text or directed lines. Returns job_id and status_url. Poll the status URL until done or error, then GET its audio path. Requires `cast:render`. A console Cast project is not required. Submissions are not automatically retried.

## Request body

- union
  - object
    - `script` string, required
    - `voice` string, required
    - `lines` CastLine[]
      - `text` string, required
      - `emotion` string, required
      - `intensity` union, required
        - string
        - number
    - `steps` integer
  - object
    - `script` string
    - `voice` string, required
    - `lines` CastLine[], required
      - `text` string, required
      - `emotion` string, required
      - `intensity` union, required
        - string
        - number
    - `steps` integer

## Response `202`

Render accepted.

- object
  - `job_id` string, required
  - `status_url` string, required
  - `status` 'queued', required

## Other responses

- `400`: Invalid request (bad field, unsupported value)
- `401`: Missing or invalid API key (`code: unauthorized`)
- `403`: Key lacks the required scope or the origin is not allow-listed (`code: forbidden | origin_not_allowed`)
- `422`: The requested voice is not supported by Cast (`unsupported_voice`).

---

[API](https://skmtc.dev/pyai/apis/pyai-api.md) · [All operations](https://skmtc.dev/pyai/apis/pyai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pyai/apis/pyai-api/revisions/271a1539185b?raw)
