---
title: "Create Speech Task"
method: POST
path: "/v1/tts/max"
tags: ["Voice AI Beta — Max"]
---

# Create Speech Task

`POST /v1/tts/max`

## Request

- Base URL: `https://genaipro.io/api`
- URL: `https://genaipro.io/api/v1/tts/max`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/genaipro/apis/genaipro-api/docs/v1/tts/max/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a Text-to-Speech task with Max. Provide **exactly one** of `voice_id` (preset voice from `GET /v1/tts/max/voices`) or `voice_asset_id` (your voice clone). Text may contain emotion, pause and sound tags (see the **Voice AI Beta — Max** tag). Cost: `⌈characters × 0.7⌉` credits, deducted at creation and returned as `cost`; refunded automatically on failure.

### Example
```bash
curl -X POST https://genaipro.io/api/v1/tts/max \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "{happy}Hello, this is GenAIPro!{/happy} <#0.5#> (laughs) Welcome.", "voice_id": "VOICE_ID", "tts_model": "max-hd", "language": "en", "speed": 1.0}'
```
> **Rate limit:** 30 requests/minute

## Request body

- object
  - `title` string: Optional title (max 200 characters; derived from content when empty)
  - `content` string, required: Text to convert to speech (may contain emotion / pause / sound tags)
  - `voice_id` string: Preset voice id (from `GET /v1/tts/max/voices`). Provide exactly one of `voice_id` / `voice_asset_id`.
  - `voice_asset_id` string: Voice clone id (from `POST /v1/tts/voice-assets`, status `ready`). Provide exactly one of `voice_id` / `voice_asset_id`.
  - `tts_model` 'max-hd' | 'max-turbo': `max-hd` = best quality, `max-turbo` = faster. Same price. Unknown values → `400` `"Unsupported tts_model"`.
  - `language` string: Language hint, ISO-639-1 (`en`, `zh`, `yue` (Cantonese), `ja`, `ko`, `fr`, `de`, `es`, `pt`, `ru`, `ar`, `hi`, `it`, `id`, `tr`, …; 40 supported). Regional codes are accepted (`en-US`, `pt_BR`, `zh-HK` = Cantonese). Empty = automatic detection. Unsupported codes → `400`.
  - `speed` number: Speaking speed (values outside the range are clamped)
  - `volume` number: Output volume (values outside the range are clamped)
  - `pitch` integer: Pitch shift in semitones (values outside the range are clamped)
  - `callback_url` string: Optional webhook — receives the task object when the task completes or fails

## Response `200`

Task created

- TtsTaskCreatedWithCost: Create-task acknowledgement
  - `id` string: Task ID (poll via the provider's `GET /{id}`)
  - `status` 'pending' | 'cloning' | 'queued' | 'processing' | 'merging' | 'process_merging' | 'completed' | 'failed': Voice AI Beta task lifecycle: `pending` → `cloning` (clone flow only) → `queued` → `processing` → `merging` → `process_merging` → `completed` | `failed`.
  - `provider` string
  - `total_length` integer: Billable characters (encoder units ≈ UTF-8 bytes)
  - `cost` integer: Credits deducted for this task

## Other responses

- `400`: Invalid request (voice selection, language, tts_model, content, credit, callback)
- `429`: Rate limit exceeded
- `503`: Temporarily unavailable (voice could not be verified, or generation capacity is busy) — nothing is charged; retry later

## Changes

- **2026-10-29** `8e065c159192`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/genaipro/apis/genaipro-api/changes/v1/tts/max/post.md)

---

[API](https://skmtc.dev/genaipro/apis/genaipro-api.md) - [All operations](https://skmtc.dev/genaipro/apis/genaipro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/genaipro/apis/genaipro-api/revisions/264ca07ba262?raw)
