---
title: "Preview one directed line"
method: POST
path: "/v1/cast/speech"
tags: ["Cast"]
---

# Preview one directed line

`POST /v1/cast/speech`

## Request

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

Synchronously renders a single line for quick preview. Long-form renders must use render jobs. Requires `cast:render`.

## Request body

- object
  - `text` string, required
  - `voice` string, required
  - `emotion` string, required
  - `intensity` union, required
    - string
    - number

## Response `200`

WAV preview audio.

## 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)
