This quickstart walks you through your first Supertone API call — from authentication to a playable audio file.Documentation Index
Fetch the complete documentation index at: https://docs.supertoneapi.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Get an API key
The Supertone API uses API-key authentication. Issue one from the developer console:- Sign up at console.supertoneapi.com.
- Create a new service and copy the generated key.
- Store it as an environment variable so it stays out of source control:
You can issue up to 3 API keys per account. If a key leaks, revoke and reissue it from the console.
2. Generate your first speech
Pick your language below and run the snippet. The Python and TypeScript SDKs handle authentication, retries, and chunking for long text out of the box. The code uses an examplevoice_id — once you’ve heard it work, swap it for any voice from the voice library.
- Python
- TypeScript
- cURL
Install the SDK:Create Run it:
quickstart.py:speech.wav — you should hear the line spoken in the example voice.
3. What’s happening under the hood
| Step | What it does |
|---|---|
Supertone(api_key=...) / new Supertone({ apiKey }) | Creates a client. The key is sent in the x-sup-api-key header. |
voice_id | Identifies which character speaks the text. |
text | The script to synthesize. Max 300 characters per API call. SDKs auto-chunk longer text. |
language | Language of the text. Required, and must be supported by the voice and model. |
model | Defaults to sona_speech_1. See Models for trade-offs. |
output_format | wav (default) or mp3. |
models.APIConvertTextToSpeechUsingCharacterRequestLanguage.EN) if you prefer type safety over plain strings — both work.
4. Next steps
Find more voices
Browse the preset library and find a
voice_id for your use case.Pick a model
Choose between
sona_speech_2, sona_speech_2_flash, supertonic_api_3, supertonic_api_1, and sona_speech_1.Handle long text
Understand the 300-character API limit and SDK auto-chunking.
Tune the voice
Adjust pitch, intonation, and speed with
voice_settings.