ai_tts
Synthesize speech from text. Returns audio bytes as base64, or saves to a storage path.
Without model, the free default voice is used — no activation, no bill, nothing to choose.
inworld-tts-2-flash(default) — free: 166 English voices by name (default Ashley; e.g. Dennis, Olivia, Duncan). A Kokoro voice id maps to a similar voice. Up to 2,000 chars per call.word_timings: truealso returns per-word start/end seconds.hexgrad/Kokoro-82M— free: 28 English voices by id (default af_bella). Up to 8,000 chars.ResembleAI/chatterbox-turbo— free: one built-in voice (omitvoice). Up to 8,000 chars.
All are free within fair-use limits; ai_catalog lists every voice. A voice whose provider is down returns VOICE_UNAVAILABLE; nothing is substituted.
Activation required: ai_tts.
Example:
{
"project_id": "my-saas",
"voice": "Ashley",
"text": "Welcome to our app! Let's get started.",
"storage": "/audio/welcome.mp3"
}
// Returns: { "storage_path": "/audio/welcome.mp3", "size_bytes": 40320, "cost": { "total": "$0.00" } }Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"text": "<text>"
},
"name": "ai_tts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language code (en, es, fr, zh, ja, ko, …). Default en. | |
| text | Yes | Text to speak. Default voice: up to 2,000 chars. | |
| model | No | Optional. Omitted: the free default voice (inworld-tts-2-flash). Also hexgrad/Kokoro-82M and ResembleAI/chatterbox-turbo; ai_catalog lists every model that can serve today. | |
| voice | No | Voice name for the chosen model, e.g. Ashley (default), Dennis, Olivia; Kokoro ids like af_bella. Full lists in ai_catalog. | |
| storage | No | Optional storage path like /audio/greeting.mp3. When set, saves to the project filesystem. | |
| project_id | Yes | Project ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them). | |
| word_timings | No | Default voice only. true: also return words with start/end seconds, for syncing text to audio. |