Voice AI Beta — Max

Create Speech Task

Changed on

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

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

post/v1/tts/max

Request

Request body

titlestring

Optional title (max 200 characters; derived from content when empty)

contentstring required

Text to convert to speech (may contain emotion / pause / sound tags)

voice_idstring

Preset voice id (from GET /v1/tts/max/voices). Provide exactly one of voice_id / voice_asset_id.

voice_asset_idstring

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".

languagestring

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.

speednumber

Speaking speed (values outside the range are clamped)

volumenumber

Output volume (values outside the range are clamped)

pitchinteger

Pitch shift in semitones (values outside the range are clamped)

callback_urlstring

Optional webhook — receives the task object when the task completes or fails

Example request

{
  "content": "{happy}Hello, this is GenAIPro!{/happy} <#0.5#> Welcome."
}

Response

Task created

idstring

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.

providerstring
total_lengthinteger

Billable characters (encoder units ≈ UTF-8 bytes)

costinteger

Credits deducted for this task

Example response

{
  "status": "completed",
  "provider": "lyra"
}

Changes