Frequently asked questions
How do I get an API key?
Sign up on the /get-api-key/ page using Google or an email and password. Your account is specific to this site. The dashboard displays your active API key, current balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the previous one.
Which SDKs are supported?
We do not provide an official SDK. Instead, the API follows the same request shape as the OpenAI speech endpoint. This allows you to use the official OpenAI SDKs by simply changing the base_url to https://api.teosbetbonus.com/v1. You can also use plain HTTP requests.
Can I use Python with this API?
Yes, Python works well via the OpenAI SDK or standard HTTP libraries. Send a POST request to the speech endpoint with your JSON body. You can generate audio files for datasets by iterating through your text inputs and handling the returned audio data in your script.
What is the base URL?
The API base URL is https://api.teosbetbonus.com/v1. Use this for all requests, including POST for speech generation and GET for retrieving voices and models. Ensure your authentication header uses this base URL when configuring your SDK client or HTTP client library.
How do I specify a voice?
Include the voice parameter in your JSON body with one of the eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. You can also fetch the full list of available voices and their details by making a GET request to /v1/voices.
What happens if I exceed the rate limit?
You are limited to 60 requests per minute per key (or 10 before the first top-up). If you exceed this, requests may be queued or rejected. Failed requests are free, so you are not charged for audio that fails to generate due to limits or errors.
Is there a WebSocket option?
No, there is no WebSocket option. The API is request-response based. You send text and receive an audio file. There is no streaming or real-time partial audio support. You must wait for the full audio file to be generated before proceeding.
Do I need to install a specific package?
No specific package is required. You can use the official OpenAI SDK or any standard HTTP library. If using the OpenAI SDK, just point it to our base URL. No custom client library or SDK needs to be installed for basic functionality.
How do I handle errors in code?
Check the HTTP status code and response body for error details. Failed requests are free, so you are not charged for audio that fails to generate. Implement retry logic for transient errors, but be mindful of the rate limits to avoid queuing delays.
Can I change my API key?
Yes, you can issue a new API key at any time from your dashboard. When you generate a new key, the old one stops working immediately. This is useful for rotating keys for security or managing different projects within the same account.
What is the maximum text length?
The maximum input text length is 4096 characters per request. For longer texts, split them into parts of up to 4096 characters and join the resulting audio files. Spaces and punctuation count toward the character limit used for billing.
Does the API support streaming?
No, the API does not support streaming. You send a request and receive the complete audio file in the response. There is no real-time partial audio delivery.
How do I detect errors in responses?
Inspect the HTTP status code and the JSON response body for error messages. Failed synthesis requests are free, so you can retry without cost. Ensure your code handles network errors and API-specific error codes to maintain robust data generation pipelines.
Is the SDK documentation available?
We do not provide official SDK documentation. However, since the API matches the OpenAI speech endpoint shape, the OpenAI SDK documentation is applicable. Use the OpenAI SDK docs and adjust the base_url to our API endpoint for implementation guidance.
First request
curl
curl https://api.teosbetbonus.com/v1/audio/speech \
-H "Authorization: Bearer $TTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","voice":"aria","input":"Hello from the API.","response_format":"mp3"}' \
--output hello.mp3Python (openai)
from openai import OpenAI
client = OpenAI(base_url="https://api.teosbetbonus.com/v1", api_key="tts-...")
with client.audio.speech.with_streaming_response.create(
model="tts-1", voice="nova", input="Hello from Python.", response_format="mp3"
) as response:
response.stream_to_file("hello.mp3")Node.js (openai)
import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({ baseURL: "https://api.teosbetbonus.com/v1", apiKey: process.env.TTS_API_KEY });
const res = await client.audio.speech.create({ model: "tts-1", voice: "milo", input: "Hello from Node.js." });
fs.writeFileSync("hello.mp3", Buffer.from(await res.arrayBuffer()));| voice | |
|---|---|
aria | female |
nova | female |
luna | female |
sage | female |
felix | male |
milo | male |
atlas | male |
orion | male |
| language | |
|---|---|
ar | العربية |
zh | 中文 |
da | Dansk |
nl | Nederlands |
en | English |
fi | Suomi |
fr | Français |
de | Deutsch |
el | Ελληνικά |
he | עברית |
hi | हिन्दी |
it | Italiano |
ja | 日本語 |
ko | 한국어 |
ms | Bahasa Melayu |
no | Norsk |
pl | Polski |
pt | Português |
ru | Русский |
es | Español |
sw | Kiswahili |
sv | Svenska |
tr | Türkçe |
Authentication and Keys
Start by visiting /get-api-key/ and signing in with Google or your email. Your unique API key appears immediately, ready for use in your first request.
Generating Your API Key
Accounts are created per site. Once registered, you receive a single active key displayed on your dashboard alongside your balance and usage stats.
Bearer Token Format
Include your key in the Authorization header as a Bearer token. The format is strictly Authorization: Bearer tts-... for all API calls.
Key Rotation Policy
You can issue a new key at any time via the dashboard. The previous key stops working immediately, ensuring tight control over access.
First Request with cURL
To verify your API key and engine, send a POST request to the speech endpoint. This basic call demonstrates how the service accepts text and returns synthesized audio immediately. It is a reliable way to confirm your credentials work before integrating into larger pipelines.
You can use any HTTP client, but cURL is convenient for quick terminal tests. The service expects a JSON payload containing the model, input text, voice selection, and desired audio format. Successful requests return the audio file directly in the response body.
Basic Speech Endpoint
Send your request to POST https://api.teosbetbonus.com/v1/audio/speech. This single endpoint handles all synthesis tasks. You do not need separate URLs for different models or voices; they are selected via the JSON body parameters.
Ensure your API key is included in the Authorization header as a Bearer token. Requests are processed one after another, so under load a request may wait in a queue.
- Endpoint:
POST https://api.teosbetbonus.com/v1/audio/speech - Method: POST
- Content-Type: application/json
JSON Body Structure
The request body must be valid JSON. Required fields include model (set to tts-1 or tts-1-hd), input (your text, max 4096 characters), and voice (one of the eight presets like nova or atlas). The response_format is also required.
Optional fields allow you to adjust speed (0.25–4.0) and specify a language ISO code. If you omit the language, the system guesses it from the script, defaulting to English for Latin text. Spaces and punctuation count toward the character limit.
model: "tts-1" or "tts-1-hd" (same engine/price)input: String, max 4096 charactersvoice: e.g., "aria", "nova", "atlas"response_format: "mp3", "wav", "opus", "flac", or "pcm"speed: Number, 0.25 to 4.0language: Optional ISO code
Response Format
On success, the response contains the raw audio bytes with the appropriate Content-Type header (e.g., audio/mpeg for MP3). There is no JSON wrapper around the audio data; you receive the file directly.
If the synthesis fails, you receive an error JSON object with a message explaining the issue. Failed requests are free, so you are not charged for characters processed in erroneous calls. Always check the status code before writing the binary data to disk.
Using the OpenAI SDK
The API follows the same request shape as the OpenAI speech endpoint, allowing you to use the official OpenAI SDKs with minimal configuration. By simply changing the base_url to https://api.teosbetbonus.com/v1, you can leverage existing client libraries for seamless integration.
Setting the Base URL
Configure your SDK client to point to our API endpoint. This ensures all requests, including authentication and audio generation, route correctly through our infrastructure without modifying the core payload structure.
SDK Compatibility
The official OpenAI SDKs work directly with our endpoint. This means you can use familiar tools and patterns without needing a custom client library or middleware layer.
Code Examples
Below is a minimal Python example using the OpenAI library. It demonstrates setting the base URL and making a standard speech request with a specific voice and model.
```python import openai client = openai.OpenAI( base_url="https://api.teosbetbonus.com/v1", api_key="tts-your-api-key" ) speech = client.audio.speech.create( model="tts-1", voice="nova", input="Hello world, this is a test." ) ```
Supported Voices and Models
Our API offers two model variants, tts-1 and tts-1-hd, which use the same underlying engine and pricing. This ensures consistent voice quality and cost regardless of your choice, simplifying budget calculations for large-scale dataset generation.
tts-1 and tts-1-hd
Both models use the same engine. You can switch between them without adjusting your integration logic, as the request structure remains unchanged. This flexibility allows teams to experiment with performance needs without impacting the final audio output quality.
Voice Selection
Choose from eight distinct voice presets tailored for different dataset tones. Female options include Aria (warm narrator), Nova (bright), Luna (soft storytelling), and Sage (calm instructional). Male voices feature Felix (energetic), Milo (friendly), Atlas (neutral news), and Orion (deep documentary).
- Aria: Warm, clear narrator
- Nova: Bright, upbeat
- Luna: Soft, storytelling
- Sage: Calm, instructional
- Felix: Energetic, promo
- Milo: Friendly, conversational
- Atlas: Neutral, news
- Orion: Deep, documentary
Language Codes
Each voice supports 23 languages, from Arabic to Turkish. While the system guesses language from Latin script (defaulting to English), you should explicitly set the ISO code for non-English Latin texts to ensure accurate pronunciation. This consistency is crucial for training robust ML models.
Audio Formats and Speed
Choose the audio format that best fits your dataset requirements. We support MP3, WAV, OPUS, FLAC, and PCM, allowing you to balance file size and quality. Each generated file includes an inaudible watermark marking it as synthetic speech, which helps in identifying dataset origins.
MP3, WAV, OPUS, FLAC, PCM
Select your preferred output format via the response_format field. MP3 offers efficient compression, while WAV and FLAC provide lossless quality. PCM is available for raw audio, and OPUS is a supported format.
Speed Range (0.25–4.0)
Adjust speech tempo using the speed parameter, which accepts values between 0.25 and 4.0. The default is 1.0. Slower speeds can improve clarity for complex technical terms, while faster speeds reduce generation time for large-scale data collection.
Format Selection
Format choice affects file size but not the underlying engine. Since tts-1 and tts-1-hd use the same engine, format selection is purely a post-processing decision. Ensure your downstream ML pipelines can handle the chosen format natively.

Handling Long Texts
Each API call accepts a maximum of 4096 characters. This limit applies to the input text, including spaces and punctuation. If your source text exceeds this length, you must split it into smaller chunks before sending requests.
4096 Character Limit
The API enforces a strict 4096-character cap per request. Exceeding this limit will result in an error. This constraint simplifies batch processing logic for large datasets.
Splitting and Joining
Split your text into segments of up to 4096 characters. Generate audio for each segment independently. Concatenate the resulting audio files to reconstruct the full speech. This approach ensures reliable synthesis without truncation.
Since requests are processed sequentially, long texts may experience queue delays. Plan your generation pipeline accordingly to maintain consistent throughput.
Batch Processing
Organize your splits by voice and language to minimize model switching overhead. Process chunks in parallel if your rate limits allow. Monitor your character count to avoid wasting credits on partial overlaps.
Failed requests are free, so retrying failed chunks incurs no extra cost. This makes batch processing robust against transient errors during high-volume dataset generation.
Rate Limits and Quotas
Rate limits govern how quickly your API key can process requests. By default, every key is allowed 60 requests per minute, which is sufficient for most dataset generation workflows. If your synthesis job requires higher throughput, you can scale your usage without changing your integration code.
60 Requests per Minute
Each active API key is capped at 60 requests per minute. Since requests are processed sequentially, longer texts may queue behind others. This limit applies uniformly regardless of the model used, whether you choose tts-1 or tts-1-hd.
Initial Limit (10/min)
New keys start with a limit of 10 requests per minute. This applies until your first top-up is processed. This lower initial limit helps manage load while verifying account validity before allowing higher volume generation.
Limit Increases
The limit increases automatically after your first USDT top-up. No manual request is needed. Once the transfer is confirmed on the TRON network, your key immediately qualifies for the standard 60 requests per minute quota.
Error Handling and Codes
When synthesis fails, you incur no charge; the fee is returned in full. Errors typically stem from invalid JSON, unsupported characters, or temporary queue delays. The API returns a clear error message in the response body to help you debug quickly without wasting credits.
Understanding these codes ensures your integration remains robust. Since requests are processed sequentially, occasional delays are normal. Always check the response status before assuming a failure, and verify your input text does not exceed the 4,096-character limit per request.
Common Error Messages
The API returns descriptive messages for issues like 'Input too long' or 'Invalid voice ID.' These messages appear directly in the JSON response body, allowing you to log and handle specific failures programmatically without guessing the cause.
- Input too long: Text exceeds 4,096 characters.
- Invalid voice: Voice ID not in the supported list.
- Rate limit exceeded: You have sent too many requests per minute.
- Invalid model: Use 'tts-1' or 'tts-1-hd'.
Status Codes
Standard HTTP status codes indicate the result. A 200 OK means the audio file is ready. Other codes, such as 400 or 429, indicate client errors or rate limits respectively. Always inspect the status code before parsing the response body.
Check the body for details on why synthesis failed, such as unsupported language or voice issues. Check the body for details on why synthesis failed, such as unsupported language or voice issues.
- 200 OK: Request successful, audio generated.
- 400 Bad Request: Invalid JSON or parameters.
- 401 Unauthorized: Invalid or expired API key.
- 429 Too Many Requests: Rate limit exceeded.
Retry Logic
Implement exponential backoff for transient errors. Since requests are processed one after another, under load a request may wait in a queue. A brief pause before retrying often resolves temporary congestion issues.
For rate limit errors (429), wait at least 60 seconds before retrying. The limit resets every minute. If you exceed the 60 requests per minute limit, pause your batch processing to avoid further delays.
- Use exponential backoff for 5xx errors.
- Wait 60 seconds for 429 errors.
- Retry once for transient queue delays.
- Do not retry failed requests multiple times in parallel.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Large teams require diverse synthetic speech datasets to train accurate machine learning models.
23 languages
Any voice speaks any of these languages.
