v1

latestOpenAPI 3.1.02026-07-268938.0 KB
OpenAPI v1

Text to Speech

post/v1/tts

Headers

model's1' | 's2-pro' | 's2.1-pro' | 's2.1-pro-free' required

Specify which TTS model to use. Use s2.1-pro-free for the free developer tier.

Request body

{"stackTrail":"components:schemas:TTSRequest","oasType":"schema","type":"unknown","description":"Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is only available with the S2-Pro model.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue, S2-Pro only)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `<|speaker:0|>`, `<|speaker:1|>`, etc. to indicate speaker changes, e.g., \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)"}

Response

Request fulfilled, document follows

All 8 operations