Getting Started
Start synthesising speech with the SonexLabs API in under 5 minutes.
Go to sonexlabs.com and sign up. Once logged in, you will be placed in a workspace (tenant).
In the sidebar, go to Configurations → Developer. Under the API Keys tab, click Create key, give it a name, and copy the key immediately — it is shown only once.
vsk_ and are scoped to your workspace. Store them in environment variables — never in source code.Replace YOUR_API_KEY and VOICE_ID below. You can find voice IDs by calling GET /v1/voices or browsing the voices in your dashboard.
curl -X POST https://api.sonexlabs.com/v1/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, welcome to SonexLabs.",
"voice_id": "VOICE_ID",
"output_format": "wav"
}' \
--output speech.wavA successful response returns raw audio bytes with Content-Type: audio/wav.
Fetch the voices available to your workspace. The id field is what you pass as voice_id.
curl https://api.sonexlabs.com/v1/voices \ -H "Authorization: Bearer YOUR_API_KEY"
[
{
"id": "abc123xyz",
"name": "Priya",
"language": "hi-IN",
"gender": "female",
"type": "platform",
"preview_url": "https://..."
}
]Each synthesis call deducts from your TTS service credits first, then from your wallet balance. Check your remaining balance at any time:
curl https://api.sonexlabs.com/v1/balance \ -H "Authorization: Bearer YOUR_API_KEY"
{
"wallet": { "balance": 5.00, "currency": "USD" },
"credits": [
{ "service": "tts", "available": 50000, "next_expiry": "2027-06-01T00:00:00Z" }
]
}Pāṇini TTS supports 200+ languages. Pass the BCP-47 code as the language field. Leave it empty or omit it for auto-detection.
| Language | Code |
|---|---|
| 🇬🇪 Abkhazian | ab |
| 🇿🇦 Afrikaans | af |
| 🇦🇱 Albanian | sq |
| 🇩🇿 Algerian Arabic | arq |
| 🇨🇳 Amdo Tibetan | adx |
| 🇪🇹 Amharic | am |
| 🇮🇳 Angika | anp |
| 🇦🇲 Armenian | hy |
| 🇮🇳 Assamese | as |
| 🇪🇸 Asturian | ast |
| 🇹🇼 Atayal | tay |
| 🇵🇪 Ayacucho Quechua | quy |
| 🇦🇿 Azerbaijani | az |
| 🇧🇯 Baatonum | bba |
| 🇨🇲 Bafia | ksf |
| 🇨🇲 Bafut | bfd |
| 🇨🇲 Bamun | bax |
| 🇮🇩 Banjar | bjn |
| 🇨🇮 Baoulé | bci |
| 🇨🇲 Basa Cameroon | bas |
| 🇷🇺 Bashkir | ba |
| 🇪🇸 Basque | eu |
| 🇧🇾 Belarusian | be |
| 🇮🇳 Bengali | bn |
| 🇮🇳 Bhili | bhb |
| 🇮🇳 Bhojpuri | bho |
| 🇮🇳 Bodo | brx |
| 🇧🇦 Bosnian | bs |
| 🇮🇳 Braj | bra |
| 🇫🇷 Breton | br |
| 🇮🇩 Buginese | bug |
| 🇧🇬 Bulgarian | bg |
| 🇮🇳 Bundeli | bns |
| 🇲🇲 Burmese | my |
| 🇨🇲 Cameroon Pidgin | wes |
| 🇨🇳 Cantonese | yue |
| 🇪🇸 Catalan | ca |
| 🇵🇭 Cebuano | ceb |
| 🇲🇽 Central Nahuatl | nhn |
| 🇺🇸 Central Yupik | esu |
| 🇹🇩 Chadian Arabic | shu |
| 🇲🇼 Chichewa | ny |
| 🇪🇨 Chimborazo Highland Quichua | qug |
| 🇨🇳 Chinese | zh |
| 🇷🇺 Chuvash | cv |
| 🇬🇧 Cornish | kw |
| 🇭🇷 Croatian | hr |
| 🇨🇿 Czech | cs |
| 🇬🇭 Dagbani | dag |
| 🇩🇰 Danish | da |
| 🇮🇳 Dogri | dgo |
| 🇳🇵 Dotyali | dty |
| 🇳🇱 Dutch | nl |
| 🇨🇮 Dyula | dyu |
| 🇵🇰 Eastern Balochi | bgp |
| 🇷🇺 Eastern Mari | mhr |
| 🇪🇬 Egyptian Arabic | arz |
| 🇰🇪 Embu | ebu |
| 🇬🇧 English | en |
| 🇷🇺 Erzya | myv |
| 🌐 Esperanto | eo |
| 🇪🇪 Estonian | et |
| 🇪🇸 Extremaduran | ext |
| 🇬🇭 Farefare | gur |
| 🇵🇭 Filipino | fil |
| 🇫🇮 Finnish | fi |
| 🇫🇷 French | fr |
| 🇬🇳 Fulah | ff |
| 🇪🇸 Galician | gl |
| 🇺🇬 Ganda | lg |
| 🇮🇳 Garhwali | gbm |
| 🇬🇪 Georgian | ka |
| 🇩🇪 German | de |
| 🇮🇳 Goan Konkani | gom |
| 🇬🇷 Greek | el |
| 🇵🇾 Guarani | gn |
| 🇮🇳 Gujarati | gu |
| 🇮🇳 Gujari | gju |
| 🇸🇦 Gulf Arabic | afb |
| 🇰🇪 Gusii | guz |
| 🇮🇳 Hadothi | hoj |
| 🇭🇹 Haitian | ht |
| 🇳🇬 Hausa | ha |
| 🇺🇸 Hawaiian | haw |
| 🇮🇱 Hebrew | he |
| 🇮🇳 Hindi | hi |
| 🇲🇽 Huautla Mazatec | mau |
| 🇭🇺 Hungarian | hu |
| 🇮🇸 Icelandic | is |
| 🇳🇬 Igbo | ig |
| 🇮🇩 Indonesian | id |
| 🌐 Interlingua | ia |
| 🇺🇸 Inupiaq | ik |
| 🇮🇪 Irish | ga |
| 🇷🇺 Iron Ossetic | os |
| 🇮🇹 Italian | it |
| 🇯🇵 Japanese | ja |
| 🇮🇩 Javanese | jv |
| 🇩🇿 Kabyle | kab |
| 🇰🇪 Kalenjin | kln |
| 🇰🇪 Kamba | kam |
| 🇮🇳 Kannada | kn |
| 🇮🇳 Kashmiri | ks |
| 🇰🇿 Kazakh | kk |
| 🇨🇳 Khams Tibetan | khg |
| 🇰🇭 Khmer | km |
| 🇮🇳 Kinnauri | kfk |
| 🇷🇼 Kinyarwanda | rw |
| 🇰🇬 Kirghiz | ky |
| 🇮🇳 Konkani | knn |
| 🇰🇷 Korean | ko |
| 🇳🇦 Kuanyama | kj |
| 🇱🇦 Lao | lo |
| 🇱🇻 Latgalian | ltg |
| 🇱🇻 Latvian | lv |
| 🇸🇾 Levantine Arabic | apc |
| 🇱🇾 Libyan Arabic | ayl |
| 🇮🇹 Ligurian | lij |
| 🇨🇩 Lingala | ln |
| 🇱🇹 Lithuanian | lt |
| 🇨🇩 Luba-Lulua | lua |
| 🇰🇪 Luo | luo |
| 🇮🇳 Lushai | lus |
| 🇱🇺 Luxembourgish | lb |
| 🇲🇰 Macedo-Romanian | rup |
| 🇲🇰 Macedonian | mk |
| 🇮🇳 Maithili | mai |
| 🇲🇾 Malay | ms |
| 🇮🇳 Malayalam | ml |
| 🇮🇳 Manipuri | mni |
| 🇮🇲 Manx | gv |
| 🇳🇿 Maori | mi |
| 🇮🇳 Marathi | mr |
| 🇮🇳 Marwari | mve |
| 🇰🇪 Meru | mer |
| 🇮🇶 Mesopotamian Arabic | acm |
| 🇮🇳 Mewari | mtr |
| 🇨🇳 Min Nan Chinese | nan |
| 🇷🇺 Moksha | mdf |
| 🇲🇳 Mongolian | mn |
| 🇲🇦 Moroccan Arabic | ary |
| 🇸🇦 Najdi Arabic | ars |
| 🇳🇦 Ndonga | ng |
| 🇮🇹 Neapolitan | nap |
| 🇳🇵 Nepali | npi |
| 🇳🇬 Nigerian Pidgin | pcm |
| 🇮🇳 Nimadi | noe |
| 🇳🇴 Norwegian | no |
| 🇫🇷 Occitan | oc |
| 🇮🇳 Odia | ory |
| 🇴🇲 Omani Arabic | acx |
| 🇪🇹 Oromo | om |
| 🇵🇰 Pahari-Potwari | phr |
| 🇹🇼 Paiwan | pwn |
| 🇮🇳 Panjabi | pa |
| 🇮🇷 Persian | fa |
| 🇮🇹 Piemontese | pms |
| 🇲🇬 Plateau Malagasy | plt |
| 🇵🇱 Polish | pl |
| 🇵🇹 Portuguese | pt |
| 🇹🇿 Rangi | lag |
| 🇷🇴 Romanian | ro |
| 🇨🇭 Romansh | rm |
| 🇹🇿 Rombo | rof |
| 🇷🇺 Russian | ru |
| 🇹🇼 Sakizaya | szy |
| 🇮🇳 Sanskrit | sa |
| 🇮🇳 Santali | sat |
| 🇵🇰 Saraiki | skr |
| 🇮🇹 Sardinian | sc |
| 🇹🇼 Sediq | trv |
| 🇷🇸 Serbian | sr |
| 🇿🇼 Shona | sn |
| 🇮🇹 Sicilian | scn |
| 🇮🇳 Sikkimese | sip |
| 🇵🇰 Sindhi | sd |
| 🇱🇰 Sinhala | si |
| 🇸🇰 Slovak | sk |
| 🇸🇮 Slovenian | sl |
| 🇸🇴 Somali | so |
| 🇸🇳 Soninke | snk |
| 🇪🇸 Spanish | es |
| 🇸🇦 Standard Arabic | arb |
| 🇸🇩 Sudanese Arabic | apd |
| 🇰🇪 Swahili | sw |
| 🇸🇪 Swedish | sv |
| 🇰🇪 Taita | dav |
| 🇹🇯 Tajik | tg |
| 🇮🇳 Tamil | ta |
| 🇷🇺 Tatar | tt |
| 🇮🇳 Telugu | te |
| 🇹🇭 Thai | th |
| 🇨🇳 Tibetan | bo |
| 🇪🇷 Tigrinya | ti |
| 🇺🇸 Tlingit | tli |
| 🌐 Toki Pona | tok |
| 🇧🇼 Tswana | tn |
| 🇮🇳 Tulu | tcy |
| 🇹🇳 Tunisian Arabic | aeb |
| 🇹🇷 Turkish | tr |
| 🇹🇲 Turkmen | tk |
| 🇬🇭 Twi | tw |
| 🇷🇺 Udmurt | udm |
| 🇨🇳 Uighur | ug |
| 🇺🇦 Ukrainian | uk |
| 🇦🇴 Umbundu | umb |
| 🇩🇪 Upper Sorbian | hsb |
| 🇵🇰 Urdu | ur |
| 🇺🇿 Uzbek | uz |
| 🇻🇳 Vietnamese | vi |
| 🇪🇪 Võro | vro |
| 🇬🇧 Welsh | cy |
| 🇷🇺 Western Mari | mrj |
| 🇸🇳 Wolof | wo |
| 🇿🇦 Xhosa | xh |
| 🇷🇺 Yakut | sah |
| 🇨🇲 Yangben | yav |
| 🇲🇽 Yaqui | yaq |
| 🇳🇬 Yoruba | yo |
| 🇳🇪 Zarma | dje |
Full list of 200+ languages at sonexlabs.com/models/tts.
The API enforces a limit of 20 requests per second per API key. When exceeded, the API returns 429 Too Many Requests. Retry after the number of seconds indicated in the Retry-After response header.