---
title: "Generate speech"
method: POST
path: "/actions/tts_generate"
tags: ["tts"]
---

# Generate speech

`POST /actions/tts_generate`

## Request

- Base URL: `https://api.voicecheap.ai/v1`
- URL: `https://api.voicecheap.ai/v1/actions/tts_generate`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Create speech from text using a catalog or owned custom voice. Uses the same character credits and plan limits as the app. Returns a history ID and a temporary audio download URL. Reuse requestId to avoid a second generation.

## Headers

- `Idempotency-Key` string, uuid

## Request body

- object
  - `requestId` string, uuid: UUID v4 for this action. Reuse the same ID with identical arguments on retries.
  - `text` string, required
  - `voice` string, required: A voice selection ID from voices_list, including clone: IDs for saved custom voices.
  - `inputType` 'text' | 'pdf'
  - `instructionPreset` 'default' | 'cheerful' | 'calm' | 'narrator' | 'dramatic' | 'whisper' | 'energetic'
  - `instructions` string
  - `speed` number
  - `sourceFileName` string

## Response `200`

Completed result or saved request state.

- object
  - `data` unknown, required
  - `requestId` string, uuid

## Other responses

- `202`: The action is running. Poll action_request_get with requestId and operation.
- `400`: Invalid arguments.
- `401`: Invalid or expired API key.
- `403`: Permission or subscription required.
- `409`: Idempotency conflict or account concurrency limit.
- `429`: Shared account rate or monthly limit reached.

---

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