Text to speech
Any text read aloud, as an MP3 or WAV file.
Send a text and pick one of 13 voices. Chab reads it aloud and gives your agent the audio file. You can tell the voice how to sound, like calm or cheerful. A long text of up to 20,000 characters comes back as one file.
Paste this into your AI agent
Set up Chab for me: fetch https://www.chab.ai/agent-setup.md?v=497c0f and follow it. Then use Chab to read this aloud in a calm, friendly voice and give me the MP3 file: "Welcome to our bakery. We are open every day from seven to six."
Your agent connects Chab and then runs it. Price: From 1 credit, about 15 credits per 1,000 characters. The free credits cover a first try. How it works in each app
- Returns
- JSON result and a file
- REST endpoint
POST /v1/speech/synthesize- Over MCP
- Call
chab_operation_startwith"speech.synthesize"
What you get
Example request
{ "text": "Hello! This is Chab reading your text aloud. You can pick a voice and tell it how to sound.", "voice": "marin", "format": "mp3"}Example result
{ "data": { "result": { "voice": "marin", "format": "mp3", "speed": 1, "character_count": 91, "characters_read": 91, "duration_seconds": 5.7, "parts": 1, "file": { "filename": "speech.mp3", "mime_type": "audio/mpeg", "byte_size": 69453 }, "usage": { "input_tokens": 23, "output_tokens": 151 } }, "artifacts": [ { "id": "art_...", "type": "audio", "role": "speech_audio", "mime_type": "audio/mpeg", "byte_size": 69453, "filename": "speech.mp3", "download_url": "/v1/operations/op_.../artifacts/art_.../download" } ], "warnings": [], "result_expires_at": "2026-11-19T13:38:39+00:00" }, "meta": { "request_id": "req_123" }}Inputs
| Field | Type | Details |
|---|---|---|
textrequired | string | The text to read aloud. A text longer than 2,500 characters is read in parts, cut at the end of a sentence, and joined into one file.Up to 20000 characters |
voice | string | The voice. marin and cedar sound the most natural. Every voice can read other languages, with an English accent at times.One of marin, cedar, alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse. Default "marin" |
instructions | string | How the voice should sound, such as "Speak in a calm, friendly voice" or "Read it like a sports commentator".Up to 1000 characters |
format | string | The audio file: MP3 (mono, 96 kbit/s) or WAV (24 kHz, 16-bit, mono).One of mp3, wav. Default "mp3" |
speed | number | How fast it speaks, from 0.5 (half as fast) to 2 (twice as fast).Default 1. Min 0.5 max 2 |
How to call it
AI apps use it through hosted MCP. Coding agents can also use the CLI, and your own code can call the API. Each call starts a job, and your agent picks up the result when it is ready.
curl -X POST https://www.chab.ai/v1/speech/synthesize \ -H "Authorization: Bearer CHAB_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: speech-synthesize-001" \ -d '{"text":"Hello! This is Chab reading your text aloud. You can pick a voice and tell it how to sound.","voice":"marin","format":"mp3"}'Text to speech result
{ "data": { "result": { "voice": "marin", "format": "mp3", "speed": 1, "character_count": 91, "characters_read": 91, "duration_seconds": 5.7, "parts": 1, "file": { "filename": "speech.mp3", "mime_type": "audio/mpeg", "byte_size": 69453 }, "usage": { "input_tokens": 23, "output_tokens": 151 } }, "artifacts": [ { "id": "art_...", "type": "audio", "role": "speech_audio", "mime_type": "audio/mpeg", "byte_size": 69453, "filename": "speech.mp3", "download_url": "/v1/operations/op_.../artifacts/art_.../download" } ], "warnings": [], "result_expires_at": "2026-11-19T13:38:39+00:00" }, "meta": { "request_id": "req_123" }}Price: From 1 credit, about 15 credits per 1,000 characters. See all prices
Want to try Chab with your agent?
Copy the prompt and paste it into your AI. Your agent starts with free credits and doesn't need an account.