Frequently asked questions
What is the API endpoint URL?
The endpoint is POST https://api.qq333casino.com/v1/audio/speech. It accepts a JSON body containing your text, voice selection, and format preferences. This endpoint handles the synthesis process and returns the generated audio file directly in the response.
How do I authenticate my requests?
Include your API key in the Authorization header as a Bearer token: Authorization: Bearer tts-.... You obtain this key after signing up on the /get-api-key/ page. Each account has one active key, which you can replace instantly if needed.
Can I use the OpenAI SDK with this API?
Yes. The request shape matches the OpenAI speech endpoint. Simply change the base_url in the official OpenAI SDK to https://api.qq333casino.com/v1 and use your site’s key. This allows you to use standard SDK methods without rewriting your integration logic.
What models are available?
Two models are available: tts-1 and tts-1-hd. Both use the same engine and price structure. You can select either model in your request body. The choice does not affect the cost, which remains $0.01 per 1,000 characters regardless of the model selected.
What is the maximum input length?
Each request supports up to 4,096 characters. If your script exceeds this limit, split the text into parts of 4,096 characters or less. Generate audio for each part separately, then join the resulting audio files to create the complete narration for your video.
How do I set the language?
Include the language field with an ISO code in your request body. If omitted, the system guesses the language, defaulting to English for Latin script. For non-English text using Latin characters, explicitly set the language to ensure accurate pronunciation and voice selection.
What happens if the request fails?
Failed requests are free. If synthesis fails, the charge is returned in full to your account balance. You can retry the request immediately without incurring additional costs. This ensures you only pay for successfully generated audio files, protecting your budget during testing or errors.
How do I handle rate limits?
The limit is 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so under load, your request may wait in a queue. Implement exponential backoff in your code to handle temporary delays during high-volume generation tasks.
Can I change the API key?
Yes, you can issue a new key at any time via the /get-api-key/ page. The old key stops working immediately when the new one is active. This allows you to rotate keys securely without downtime. You can generate a new key instantly from your dashboard.
Does the API support SSML?
No, the API does not support SSML. It accepts plain text input only. You cannot use SSML tags for pronunciation or pacing control. You can adjust the speed parameter between 0.25 and 4.0.
Is there a WebSocket endpoint?
No, there is no WebSocket endpoint for real-time streaming. The API returns the complete audio file after synthesis. You must wait for the full response before using the audio. This synchronous approach simplifies integration for batch processing and standard API workflows.
How do I generate multiple voices?
Make separate requests for each voice. Select the desired voice from the eight presets (e.g., aria, nova, felix) in the voice field of each request. Generate each voice clip individually and combine them in your post-production workflow.
What is the response content type?
The response content type depends on your chosen response_format. It returns the audio file directly in the body with the appropriate MIME type (e.g., audio/mpeg for mp3, audio/wav for wav). The response includes the generated audio data ready for playback or storage.
First request
curl
curl https://api.qq333casino.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.qq333casino.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.qq333casino.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
Authentication is handled via a Bearer token passed in the Authorization HTTP header. Each account holds a single active key, ensuring straightforward integration without managing multiple credentials.
Bearer token in header
Include the header Authorization: Bearer tts-<your-key> in every API request. The key format is tts- followed by your unique identifier.
One key per account
Your account is tied to one active API key. This key provides access to your balance, usage stats, and voice presets.
Key rotation policy
You can issue a new key at any time from the dashboard. The old key stops working immediately, ensuring no overlap or stale access.
Endpoint overview
The API provides three primary endpoints for integrating text-to-speech into your workflow. Use POST /v1/audio/speech to generate audio files from text. Access GET /v1/voices to retrieve available voice presets, languages, and formats. Use GET /v1/models to list the available model versions.
POST /v1/audio/speech
Send a JSON body with the text, voice, and format preferences. The endpoint returns the generated audio file directly in the response body. Text is limited to 4096 characters per request.
GET /v1/voices
Returns a list of all available voice presets, their associated languages, and supported audio formats. Use this endpoint to determine which voices are available before generating audio.
GET /v1/models
Lists available model versions (tts-1, tts-1-hd). Both models use the same engine and have identical pricing.
Request parameters
Configure your synthesis requests with three core parameters: model, input text, and voice preset. These fields define the audio engine, the source material, and the speaker identity for each generated clip.
Model selection (tts-1, tts-1-hd)
Select either "tts-1" or "tts-1-hd" for the model field. Both use the same underlying engine and carry identical pricing, so choose based on your quality preference without cost implication.
Input text field
Pass your script as the input string. The API accepts up to 4096 characters per request. For longer content, split the text into chunks and join the resulting audio files manually.
Voice preset selection
Assign a voice preset via the voice parameter. Choose from eight options like "nova" for upbeat reels or "atlas" for neutral news-style narration. Each voice supports all 23 available languages.
Response format
A successful request returns the synthesized audio file directly in the response body with a content-type matching your chosen format. The payload contains the raw binary data of the audio clip, ready to be saved.
Every generated file carries an inaudible watermark that marks it as synthetic speech, which is standard for this engine. There is no separate metadata envelope; the audio data itself is the complete response.
Audio file in response body
The API returns the audio data immediately upon completion. For typical usage, generation speed is roughly real-time (25 characters per second). Short phrases may take a few seconds, while longer texts are processed sequentially and may queue under load.
Supported formats (mp3, wav, opus, flac, pcm)
Select your preferred output format using the response_format parameter. Options include mp3, wav, opus, flac, and pcm. MP3 and OPUS are compressed formats, while WAV and FLAC offer lossless quality.
- mp3: Standard compressed audio
- wav: Uncompressed PCM audio
- opus: Efficient compression for web
- flac: Lossless compression
- pcm: Raw uncompressed audio
Error response structure
If synthesis fails, the charge is returned in full. The response body contains a JSON object describing the error, including a message explaining why the request failed (e.g., invalid text length or unsupported voice). Check the HTTP status code to determine the error type.
Language handling
The API determines the spoken language automatically based on the input text's script. This allows you to generate audio for mixed-language scripts without managing complex language tags for every request.
Auto-detection from script
The system analyzes the characters in your input text to infer the language. This works reliably for standard scripts like Latin, Cyrillic, or CJK characters, reducing the need for manual configuration in your automation scripts.
Explicit language ISO code
For precise control, you can pass an optional language parameter with an ISO 639-1 code (e.g., 'en', 'ja', 'de'). This ensures the correct voice accent and pronunciation, even when the script is ambiguous or mixed.
- Supported codes include: en, zh, de, fr, es, ja, ko, ru, hi, it, pt, ar, sv, nl, pl, tr, fi, el, he, ms, sw, no, da
Default to English for Latin script
If the language field is omitted and the text uses Latin script, the API defaults to English. For other Latin-script languages (e.g., German or Spanish), always set the language parameter explicitly to avoid incorrect English narration.

Rate limits
Requests are processed sequentially, so your audio generation speed depends on queue availability. Under load, a request may wait in queue before synthesis begins.
60 requests per minute
Once your account is active, you are allowed 60 requests per minute per API key. This limit applies to all calls to the /v1/audio/speech endpoint.
10 requests per minute initially
New accounts start with a lower limit of 10 requests per minute. This applies until you complete your first top-up.
Limit increase after top-up
After you add funds via USDT (TRC-20), your rate limit increases to the full 60 requests per minute automatically. The increase happens within minutes of transfer confirmation.
Error handling
Errors return standard HTTP status codes (400, 402, 429) with a JSON body describing the issue. Other error codes may also occur. Failed synthesis requests are free; if the API rejects the audio generation, the charge is returned in full, so you can retry without cost penalties for invalid inputs.
Invalid request body
Return a 400 status if the JSON is malformed, input exceeds 4096 characters, or voice is unknown. Check the error message for specific field validation failures before retrying.
Insufficient balance
A 402 error occurs if your account balance cannot cover the character cost. Top up via USDT (TRC-20) to restore functionality immediately; no subscription is required.
Rate limit exceeded
A 429 error indicates you have exceeded 60 requests per minute (or 10/min before top-up). Queue your requests and retry with exponential backoff to avoid delays.
Code examples
Generate audio files directly from your script using standard HTTP methods. The API accepts JSON payloads and returns binary audio data, fitting seamlessly into automated video rendering pipelines.
Choose between standard and high-definition models, select from eight voice presets, and specify the output format to match your editing software's requirements.
No custom SDK required; use the official OpenAI client libraries by pointing them to our base URL. Other HTTP clients work as well.
cURL request example
Send a POST request with your bearer token and text input. Replace YOUR_API_KEY with your key from the dashboard.
```bash curl -X POST "https://api.qq333casino.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova", "response_format": "mp3"}' \ -o speech.mp4 ```
Python OpenAI SDK usage
Use the OpenAI Python library, configuring the base URL to our endpoint. This works because we mirror the request shape.
```python from openai import OpenAI client = OpenAI(base_url="https://api.qq333casino.com/v1", api_key="YOUR_API_KEY") with client.audio.speech.create( model="tts-1", voice="nova", input="Short script for TikTok" ) as response: response.write_to_file("output.mp3") ```
JavaScript fetch example
Use the native fetch API to POST JSON and handle the binary response as a blob. This integrates easily with Node.js or browser-based editors.
```javascript const response = await fetch("https://api.qq333casino.com/v1/audio/speech", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ model: "tts-1", voice: "aria", input: "Social media script" }) }); const audioBlob = await response.blob(); ```
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Send multiple requests simultaneously to speed up production.
23 languages
Any voice speaks any of these languages.
