Quick Start
Learn how to generate high-quality AI voices using Supertone API with step-by-step instructions.
You can quickly integrate and use Supertone API in three steps.
Authentication
Supertone API uses key authentication through HTTP request headers. You can obtain your API Key from the Developer Console page.
Select Voice ID
Call the Get Voices API to check available voices. You can also explore various voices while creating content on Supertone Play before making your selection.
API Call
You can call the Text-to-speech API using your selected voice ID.
1. Authentication
All API requests require authentication. Obtain an API key and include it in the HTTP header when making requests.
Obtaining API Key
After being approved for the closed beta service, you can obtain your Supertone API key directly from the console page.
Issuance Policy
- Up to 3 API keys can be issued per account
- Recommended to use separate keys for different environments (e.g.,
Dev
,Stage
,Production
)
- Recommended to use separate keys for different environments (e.g.,
- Keys can be revoked and reissued at any time
- When key rotation is needed for security reasons
- When key compromise is suspected
- When you want to separate keys by project
Issuance Process
- Log in to the console page
- Access API Keys menu from the sidebar
- Click ‘Create API Key’ button to complete the issuance
API Authentication
Supertone API uses API key authentication through HTTP request headers.
Header Configuration
- Key:
x-sup-api-key
- Value: Your issued API key
- Base URL:
https://supertoneapi.com
This authentication header must be included in all API requests. Missing headers or incorrect API keys will result in a 401 Unauthorized response.
Authentication Code Examples
Here are authentication implementation examples for various programming languages.
Important Notes
- Store your API key in environment variables or configuration files to prevent exposure.
- If your API key is exposed, immediately revoke it from the console and obtain a new one.
- All API communications are conducted via HTTPS, so check for any SSL/TLS certificate issues.
- If you receive a 401 error, verify that your API key is correct and the header name is accurate.
2. Getting Voice ID
You need to specify a voice ID for voice generation. You can check available voice information by calling Get Vocies API or Search Voices API.
Check by calling the Get Voices API
You can check the list of available voices by calling the Get Voices API. The API returns a JSON response in the following format. Use the voice_id
included in the JSON response as a parameter when calling the API.
Check by calling the Search Voices API
You can search for voices using various keywords and filters by calling the Search Voices API. The API returns a JSON response in the following format. Use the voice_id
included in the JSON response as a parameter when calling the API.
3. Text-to-speech
Convert text to speech using your selected voice ID.
Basic Request Example
Specifying File Format
Supported Formats
You can specify the file format using the output_format
query parameter.
- wav:
?output_format=wav
- mp3:
?output_format=mp3