Frequently asked questions
Which SDKs are compatible?
The API matches the OpenAI speech endpoint shape, so the official OpenAI SDKs work by changing the base_url to https://api.456gocasino.com/v1 and using your API key. You can also use plain HTTP requests or any standard JSON client to interact with the service.
Can I stream audio in real-time?
No, we do not support streaming, WebSocket connections, or real-time partial audio delivery. The API returns the complete audio file in the response after synthesis finishes. For IVR systems, you can split longer texts into chunks and join the resulting audio files.
Do you support SSML tags?
No, the API does not support SSML tags, phoneme dictionaries, or custom pronunciation lexicons. You provide plain text input, and the engine handles natural prosody automatically. If you need precise control over pauses or emphasis, you must manage that logic in your application code.
What is the max character limit?
Each request accepts up to 4096 characters of input text. Spaces and punctuation count toward this limit. If your script exceeds this length, you must split the text into smaller parts and send multiple requests to ensure all content is synthesized correctly.
How do I handle long texts?
Split your text into parts of up to 4096 characters and send separate requests for each part. Join the resulting audio files in your application. This approach ensures efficient processing and avoids hitting the character limit while maintaining the flow of your IVR messages.
Is the API RESTful?
Yes, the API is RESTful. You send a POST request to /v1/audio/speech with a JSON body containing your text, voice, and format preferences. Other endpoints like /v1/voices and /v1/models are also available via standard GET requests for retrieving configuration details.
Can I use custom models?
No, you cannot upload custom voices or use custom models. The API offers eight fixed presets. The API offers eight fixed presets like Aria, Nova, and Felix. These voices are based on licensed recordings and are available for all supported languages without requiring additional configuration or model training.
Do I need a specific library?
No specific library is required. You can use the official OpenAI SDK by adjusting the base_url, or simply use any HTTP client that supports JSON. The API accepts standard JSON bodies, making it easy to integrate with your existing tech stack without extra dependencies.
How do I authenticate requests?
Include your API key in the Authorization header as a Bearer token: Authorization: Bearer tts-... You receive one active key per account. If you issue a new key, the old one stops working immediately. Ensure your key is secure and passed with every request.
What happens on timeout?
Requests are processed sequentially, so under load a request may wait in a queue. If synthesis fails, the charge is returned in full. Failed requests are free, so you are not billed for audio that was not successfully generated, regardless of the timeout duration.
First request
curl
curl https://api.456gocasino.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.456gocasino.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.456gocasino.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
Secure your API access with a Bearer token. Pass your key in the Authorization header as Bearer tts-.... This single token authenticates all requests to the CasinoVoice API.
Bearer token format
Every request must include the Authorization: Bearer tts-<your-key> header. The token identifies your account and tracks usage against your balance.
One active key per account
Each account holds exactly one active key. If you rotate your key, the previous one becomes invalid immediately. Ensure your IVR systems update the header before the old key expires.
Key rotation policy
Generate a new key from your dashboard at any time. The old key stops working the moment the new one is issued. This ensures immediate security if a key is compromised.
Endpoint: Create Speech
Send text to our TTS endpoint and receive synthesized audio files. This endpoint accepts JSON payloads containing your input text, voice selection, and formatting preferences, returning the generated audio in your chosen format.
The service is designed for call center workflows where reliability matters. Each request processes text up to 4096 characters, making it ideal for IVR prompts, welcome messages, and notification alerts.
POST /v1/audio/speech
Use the POST method on this endpoint to trigger synthesis. The API processes requests sequentially, so under heavy load, your IVR system may experience slight delays during peak call times.
JSON body structure
Send a standard JSON object with your parameters. The structure mirrors common TTS APIs, allowing you to use familiar libraries. Include the text, voice ID, and desired audio format.
Example payload structure: {"model": "tts-1", "input": "Welcome to 456 Casino", "voice": "atlas", "response_format": "mp3"}.
Required fields
You must provide the text input, model version, voice preset, and response format. The model is always either "tts-1" or "tts-1-hd". Use "tts-1" or "tts-1-hd"; both use the same engine and have identical pricing.
- model: "tts-1" or "tts-1-hd"
- input: Text string (max 4096 characters)
- voice: One of 8 presets (e.g., "atlas", "nova")
- response_format: mp3, wav, opus, flac, or pcm
Request Parameters
Configure the synthesis engine and voice persona for your IVR prompts. You select a model, voice preset, speed, and optional language to tailor the synthetic speech to your specific use case.
Model selection (tts-1)
Set the model field to either tts-1 or tts-1-hd. Both options use the same underlying engine and carry identical pricing, so you can choose based on your quality preference without worrying about cost differences.
Voice preset selection
Choose from eight distinct voice presets, such as aria for warm narration or atlas for neutral news-style delivery. Each voice supports all 23 available languages, allowing you to maintain a consistent brand tone across multilingual call centers.
Speed and language
Adjust the speed parameter between 0.25 and 4.0 to control playback rate. The language field accepts an optional ISO code; if omitted, the system guesses the language, defaulting to English for Latin script text.
Response Formats
The API returns synthesized audio in the format you specify via the response_format parameter. This flexibility allows you to choose the optimal balance between file size and quality for your IVR system or call center workflows without extra processing steps.
MP3 format options
MP3 is the default format, providing efficient compression suitable for most telephony systems. It reduces bandwidth usage while maintaining clear voice quality for standard customer interactions.
WAV and PCM support
WAV offers uncompressed audio, ideal for high-fidelity requirements or legacy systems that do not support compressed codecs. PCM provides raw audio data, useful for direct integration with specific hardware or software that requires uncompressed streams.
Opus and FLAC availability
Opus provides superior compression for low-bandwidth environments, maintaining clarity even at lower bitrates. FLAC offers lossless compression, preserving exact audio quality while reducing file size compared to WAV, perfect for archiving high-quality voice assets.
Rate Limits
Manage your API usage efficiently with clear rate limits designed for steady IVR operations. Our system allows 60 requests per minute, providing sufficient throughput for most call center needs without requiring complex throttling logic in your application.
60 requests per minute
Standard accounts can process up to 60 requests per minute. This limit applies per API key, ensuring consistent performance for your synthesis tasks.
10 requests before first top-up
New accounts start with a lower limit of 10 requests per minute. This allows you to test the API with your free trial credit before scaling up. The limit increases to 60 requests per minute after the first top-up.
Queue handling under load
Requests are processed sequentially. If you exceed the limit or send many requests rapidly, they will wait in a queue. Longer texts may take more time to generate, so plan your IVR triggers accordingly to avoid delays in call flows.

Error Handling
When building IVR systems, reliable error handling ensures your call flows don’t break. Our API uses standard HTTP status codes to indicate success or failure, allowing you to implement robust retry logic or fallback voice messages.
Common HTTP status codes
Use 200 for successful synthesis, 400 for client errors like invalid JSON, 401 for authentication issues, and 429 for rate limit exceedance. Failed requests are free, ensuring you are not charged for errors.
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 429: Too Many Requests
Invalid voice names
If you reference a voice not in our preset list (e.g., 'aria', 'nova'), the API returns a 400 error. Always fetch valid voices via GET /v1/voices before initiating synthesis.
Character limit exceeded
Each request accepts up to 4,096 characters. Exceeding this limit triggers a 400 error. Split longer texts into chunks and join the resulting audio files for seamless IVR playback.
OpenAI SDK Integration
To integrate CasinoVoice with your existing Python or Node.js applications, simply update the API base URL in your OpenAI SDK configuration. This allows you to use the official SDKs without rewriting your client logic, leveraging the same request shape as the standard speech endpoint.
Change base_url
Set the base_url parameter to https://api.456gocasino.com/v1 when initializing your OpenAI client instance. This directs all requests to our infrastructure while maintaining compatibility with the standard tts-1 and tts-1-hd model identifiers.
- Use
https://api.456gocasino.com/v1as your base URL - Keep standard model names like
tts-1ortts-1-hd - Works with both Python and JavaScript SDKs
Use official SDKs
The API mirrors the OpenAI speech endpoint structure, meaning you can use the official OpenAI SDKs directly. You only need to provide your unique tts-... bearer token in the Authorization header, ensuring seamless authentication without custom client libraries.
- No custom client library required
- Standard OpenAI SDKs work out of the box
- Supports both Python and Node.js environments
Code examples
Initialize the client with your base URL and key. Pass the text, voice preset, and desired response format (mp3, wav, opus, flac, or pcm) to the audio.speech.create method. The SDK handles the JSON payload and returns the audio file for immediate playback or storage.
- Set
base_urltohttps://api.456gocasino.com/v1 - Provide
Authorization: Bearer tts-...in headers - Call
audio.speech.createwith text and voice
Curl Example
This curl command demonstrates a basic request to generate speech using the tts-1 model. It sends a short text payload to the API endpoint, returning the audio data directly in the response body.
Basic request structure
Use the POST method with the correct base URL. The JSON body must include the model, input text, voice preset, and response format. Ensure the text does not exceed 4096 characters.
Header configuration
Include the Authorization header with your Bearer token. Set the Content-Type to application/json. The token format is 'Bearer tts-...'.
No additional headers are required for basic synthesis. The API handles language detection if not explicitly set.
- Authorization: Bearer YOUR_API_KEY
- Content-Type: application/json
Response parsing
The response contains the audio binary data. Save this directly to a file using redirection. Check the HTTP status code to confirm success or failure.
- Status 200: Audio generated successfully
- Status 429: Rate limit exceeded
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Our platform empowers startups to build scalable customer support experiences without complex infrastructure.
23 languages
Any voice speaks any of these languages.
