Getting Started

Quickstart

Start synthesising speech with the SonexLabs API in under 5 minutes.

1

Create an account

Go to sonexlabs.com and sign up. Once logged in, you will be placed in a workspace (tenant).

2

Generate an API key

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.

Important: Keys start with vsk_ and are scoped to your workspace. Store them in environment variables — never in source code.
3

Make your first request

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.wav

A successful response returns raw audio bytes with Content-Type: audio/wav.

4

List available voices

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://..."
  }
]
5

Check your balance

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" }
  ]
}

Supported languages

Pāṇini TTS supports 200+ languages. Pass the BCP-47 code as the language field. Leave it empty or omit it for auto-detection.

LanguageCode
🇬🇪 Abkhazianab
🇿🇦 Afrikaansaf
🇦🇱 Albaniansq
🇩🇿 Algerian Arabicarq
🇨🇳 Amdo Tibetanadx
🇪🇹 Amharicam
🇮🇳 Angikaanp
🇦🇲 Armenianhy
🇮🇳 Assameseas
🇪🇸 Asturianast
🇹🇼 Atayaltay
🇵🇪 Ayacucho Quechuaquy
🇦🇿 Azerbaijaniaz
🇧🇯 Baatonumbba
🇨🇲 Bafiaksf
🇨🇲 Bafutbfd
🇨🇲 Bamunbax
🇮🇩 Banjarbjn
🇨🇮 Baoulébci
🇨🇲 Basa Cameroonbas
🇷🇺 Bashkirba
🇪🇸 Basqueeu
🇧🇾 Belarusianbe
🇮🇳 Bengalibn
🇮🇳 Bhilibhb
🇮🇳 Bhojpuribho
🇮🇳 Bodobrx
🇧🇦 Bosnianbs
🇮🇳 Brajbra
🇫🇷 Bretonbr
🇮🇩 Buginesebug
🇧🇬 Bulgarianbg
🇮🇳 Bundelibns
🇲🇲 Burmesemy
🇨🇲 Cameroon Pidginwes
🇨🇳 Cantoneseyue
🇪🇸 Catalanca
🇵🇭 Cebuanoceb
🇲🇽 Central Nahuatlnhn
🇺🇸 Central Yupikesu
🇹🇩 Chadian Arabicshu
🇲🇼 Chichewany
🇪🇨 Chimborazo Highland Quichuaqug
🇨🇳 Chinesezh
🇷🇺 Chuvashcv
🇬🇧 Cornishkw
🇭🇷 Croatianhr
🇨🇿 Czechcs
🇬🇭 Dagbanidag
🇩🇰 Danishda
🇮🇳 Dogridgo
🇳🇵 Dotyalidty
🇳🇱 Dutchnl
🇨🇮 Dyuladyu
🇵🇰 Eastern Balochibgp
🇷🇺 Eastern Marimhr
🇪🇬 Egyptian Arabicarz
🇰🇪 Embuebu
🇬🇧 Englishen
🇷🇺 Erzyamyv
🌐 Esperantoeo
🇪🇪 Estonianet
🇪🇸 Extremaduranext
🇬🇭 Farefaregur
🇵🇭 Filipinofil
🇫🇮 Finnishfi
🇫🇷 Frenchfr
🇬🇳 Fulahff
🇪🇸 Galiciangl
🇺🇬 Gandalg
🇮🇳 Garhwaligbm
🇬🇪 Georgianka
🇩🇪 Germande
🇮🇳 Goan Konkanigom
🇬🇷 Greekel
🇵🇾 Guaranign
🇮🇳 Gujaratigu
🇮🇳 Gujarigju
🇸🇦 Gulf Arabicafb
🇰🇪 Gusiiguz
🇮🇳 Hadothihoj
🇭🇹 Haitianht
🇳🇬 Hausaha
🇺🇸 Hawaiianhaw
🇮🇱 Hebrewhe
🇮🇳 Hindihi
🇲🇽 Huautla Mazatecmau
🇭🇺 Hungarianhu
🇮🇸 Icelandicis
🇳🇬 Igboig
🇮🇩 Indonesianid
🌐 Interlinguaia
🇺🇸 Inupiaqik
🇮🇪 Irishga
🇷🇺 Iron Osseticos
🇮🇹 Italianit
🇯🇵 Japaneseja
🇮🇩 Javanesejv
🇩🇿 Kabylekab
🇰🇪 Kalenjinkln
🇰🇪 Kambakam
🇮🇳 Kannadakn
🇮🇳 Kashmiriks
🇰🇿 Kazakhkk
🇨🇳 Khams Tibetankhg
🇰🇭 Khmerkm
🇮🇳 Kinnaurikfk
🇷🇼 Kinyarwandarw
🇰🇬 Kirghizky
🇮🇳 Konkaniknn
🇰🇷 Koreanko
🇳🇦 Kuanyamakj
🇱🇦 Laolo
🇱🇻 Latgalianltg
🇱🇻 Latvianlv
🇸🇾 Levantine Arabicapc
🇱🇾 Libyan Arabicayl
🇮🇹 Ligurianlij
🇨🇩 Lingalaln
🇱🇹 Lithuanianlt
🇨🇩 Luba-Lulualua
🇰🇪 Luoluo
🇮🇳 Lushailus
🇱🇺 Luxembourgishlb
🇲🇰 Macedo-Romanianrup
🇲🇰 Macedonianmk
🇮🇳 Maithilimai
🇲🇾 Malayms
🇮🇳 Malayalamml
🇮🇳 Manipurimni
🇮🇲 Manxgv
🇳🇿 Maorimi
🇮🇳 Marathimr
🇮🇳 Marwarimve
🇰🇪 Merumer
🇮🇶 Mesopotamian Arabicacm
🇮🇳 Mewarimtr
🇨🇳 Min Nan Chinesenan
🇷🇺 Mokshamdf
🇲🇳 Mongolianmn
🇲🇦 Moroccan Arabicary
🇸🇦 Najdi Arabicars
🇳🇦 Ndongang
🇮🇹 Neapolitannap
🇳🇵 Nepalinpi
🇳🇬 Nigerian Pidginpcm
🇮🇳 Nimadinoe
🇳🇴 Norwegianno
🇫🇷 Occitanoc
🇮🇳 Odiaory
🇴🇲 Omani Arabicacx
🇪🇹 Oromoom
🇵🇰 Pahari-Potwariphr
🇹🇼 Paiwanpwn
🇮🇳 Panjabipa
🇮🇷 Persianfa
🇮🇹 Piemontesepms
🇲🇬 Plateau Malagasyplt
🇵🇱 Polishpl
🇵🇹 Portuguesept
🇹🇿 Rangilag
🇷🇴 Romanianro
🇨🇭 Romanshrm
🇹🇿 Romborof
🇷🇺 Russianru
🇹🇼 Sakizayaszy
🇮🇳 Sanskritsa
🇮🇳 Santalisat
🇵🇰 Saraikiskr
🇮🇹 Sardiniansc
🇹🇼 Sediqtrv
🇷🇸 Serbiansr
🇿🇼 Shonasn
🇮🇹 Sicilianscn
🇮🇳 Sikkimesesip
🇵🇰 Sindhisd
🇱🇰 Sinhalasi
🇸🇰 Slovaksk
🇸🇮 Sloveniansl
🇸🇴 Somaliso
🇸🇳 Soninkesnk
🇪🇸 Spanishes
🇸🇦 Standard Arabicarb
🇸🇩 Sudanese Arabicapd
🇰🇪 Swahilisw
🇸🇪 Swedishsv
🇰🇪 Taitadav
🇹🇯 Tajiktg
🇮🇳 Tamilta
🇷🇺 Tatartt
🇮🇳 Telugute
🇹🇭 Thaith
🇨🇳 Tibetanbo
🇪🇷 Tigrinyati
🇺🇸 Tlingittli
🌐 Toki Ponatok
🇧🇼 Tswanatn
🇮🇳 Tulutcy
🇹🇳 Tunisian Arabicaeb
🇹🇷 Turkishtr
🇹🇲 Turkmentk
🇬🇭 Twitw
🇷🇺 Udmurtudm
🇨🇳 Uighurug
🇺🇦 Ukrainianuk
🇦🇴 Umbunduumb
🇩🇪 Upper Sorbianhsb
🇵🇰 Urduur
🇺🇿 Uzbekuz
🇻🇳 Vietnamesevi
🇪🇪 Võrovro
🇬🇧 Welshcy
🇷🇺 Western Marimrj
🇸🇳 Wolofwo
🇿🇦 Xhosaxh
🇷🇺 Yakutsah
🇨🇲 Yangbenyav
🇲🇽 Yaquiyaq
🇳🇬 Yorubayo
🇳🇪 Zarmadje

Full list of 200+ languages at sonexlabs.com/models/tts.

Rate limits

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.

Error codes

401Invalid or missing API key.
402Insufficient balance. Top up in the dashboard.
422Validation error — check the request body.
429Rate limit exceeded. Back off and retry.
502TTS service temporarily unavailable.