> For the complete documentation index, see [llms.txt](https://docs.qolaba.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qolaba.ai/api-platform/text-to-speech/try-text-to-speech.md).

# Try Text to Speech

Test the text-to-speech API interactively. Choose a voice, configure parameters, and generate speech.

## Generate speech

> Convert text into natural-sounding audio. Choose from 30 distinct voices and optionally control tone and delivery with a style prompt.

```json
{"openapi":"3.0.3","info":{"title":"Qolaba Text-to-Speech API","version":"1.0.0"},"tags":[{"name":"Speech","description":"Text-to-speech synthesis"}],"servers":[{"url":"https://api.platform.qolaba.ai/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"API key passed as a Bearer token.\nGenerate your key at [platform.qolaba.ai](https://platform.qolaba.ai).\nExample: `Authorization: Bearer sk-xxxxxxxxxxxx`\n"}},"schemas":{"SynthesizeSpeechRequest":{"type":"object","required":["text","voice"],"properties":{"text":{"type":"string","maxLength":5000,"description":"The text to convert into speech"},"voice":{"type":"string","description":"Voice persona to use for synthesis","enum":["Zephyr","Puck","Charon","Kore","Fenrir","Leda","Orus","Aoede","Callirrhoe","Autonoe","Enceladus","Iapetus","Umbriel","Algieba","Despina","Erinome","Algenib","Rasalgethi","Laomedeia","Achernar","Alnilam","Schedar","Gacrux","Pulcherrima","Achird","Zubenelgenubi","Vindemiatrix","Sadachbia","Sadaltager","Sulafat"]},"model":{"type":"string","default":"gemini-2.5-flash-tts","description":"TTS model to use","enum":["gemini-2.5-flash-tts"]},"language_code":{"type":"string","description":"Language code for synthesis (e.g. `en-US`, `hi-IN`, `es-ES`). Defaults to auto-detect"},"style_prompt":{"type":"string","description":"Instructions to control tone, pace, and delivery style"}}},"SynthesizeSpeechResponse":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the generated audio file"},"mime_type":{"type":"string","description":"MIME type of the audio (e.g. `audio/mpeg`)"},"referenceID":{"type":"string","description":"Unique reference ID for tracking"}}},"APIError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","provider_error","server_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"}}}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"InsufficientCredit":{"description":"Organization has insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/studio/synthesizeSpeech":{"post":{"tags":["Speech"],"summary":"Generate speech","operationId":"synthesizeSpeech","description":"Convert text into natural-sounding audio. Choose from 30 distinct voices and optionally control tone and delivery with a style prompt.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeSpeechRequest"}}}},"responses":{"200":{"description":"Audio generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeSpeechResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/InsufficientCredit"},"502":{"description":"Upstream provider error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}}}}}}}
```

## List voices

> Retrieve all available voice personas with their names and characteristics.

```json
{"openapi":"3.0.3","info":{"title":"Qolaba Text-to-Speech API","version":"1.0.0"},"tags":[{"name":"Voices","description":"Available voices and languages"}],"servers":[{"url":"https://api.platform.qolaba.ai/api/v1","description":"Production"}],"security":[],"paths":{"/studio/speech/voices":{"get":{"tags":["Voices"],"summary":"List voices","operationId":"listVoices","description":"Retrieve all available voice personas with their names and characteristics.","responses":{"200":{"description":"List of available voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceListResponse"}}}}}}}},"components":{"schemas":{"VoiceListResponse":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Voice persona name"},"gender":{"type":"string","description":"Voice gender (e.g. Male, Female)"},"pitch":{"type":"string","description":"Voice pitch level (e.g. Higher, Middle, Lower)"},"description":{"type":"string","description":"Brief character description of the voice"},"voicePreviewUrl":{"type":"string","format":"uri","description":"URL to a sample audio clip of the voice"}}}}}}}}}
```

## List languages

> Retrieve all supported languages and their language codes.

```json
{"openapi":"3.0.3","info":{"title":"Qolaba Text-to-Speech API","version":"1.0.0"},"tags":[{"name":"Voices","description":"Available voices and languages"}],"servers":[{"url":"https://api.platform.qolaba.ai/api/v1","description":"Production"}],"security":[],"paths":{"/studio/speech/languages":{"get":{"tags":["Voices"],"summary":"List languages","operationId":"listLanguages","description":"Retrieve all supported languages and their language codes.","responses":{"200":{"description":"List of supported languages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageListResponse"}}}}}}}},"components":{"schemas":{"LanguageListResponse":{"type":"object","properties":{"total_languages":{"type":"integer","description":"Total number of supported languages"},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","description":"Human-readable language name"},"accents":{"type":"array","description":"Available regional accents for the language","items":{"type":"object","properties":{"code":{"type":"string","description":"BCP-47 language code (e.g. en-US, hi-IN)"},"region":{"type":"string","description":"Region or country name"},"status":{"type":"string","description":"Availability status of the accent","enum":["stable","preview"]}}}}}}}}}}}}
```
