Frequently asked questions
What is the base URL for the API?
The API base URL is https://api.mally168casino.com/v1. You send POST requests to https://api.mally168casino.com/v1/audio/speech. This endpoint accepts JSON bodies with your text and configuration. It follows the same request shape as the OpenAI speech endpoint, ensuring compatibility with standard HTTP clients and SDKs that support this structure.
Which models are available?
Two models are available: tts-1 and tts-1-hd. Both use the same underlying engine and pricing structure. You select the model in the request body. The choice affects audio quality but not the cost per character. Both models support the full range of voices and languages available in the system.
Can I use the OpenAI Python SDK?
Yes, the official OpenAI SDKs work perfectly. You only need to change the base_url to https://api.mally168casino.com/v1. Use your site-specific API key for authentication. The request shape matches the OpenAI speech endpoint exactly. This allows you to integrate VocalMesh into existing workflows with minimal code changes.
How do I set the language parameter?
Include the language field as an optional ISO code in your request. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, you must explicitly set the language parameter to ensure correct pronunciation and voice selection.
What happens if the input exceeds 4096 characters?
Each request supports up to 4096 characters. For longer texts, split the input into parts of this size. Generate audio for each part separately. Then join the resulting audio files to create the final output. This ensures consistent quality and avoids truncation or processing errors in the synthesis engine.
Does the API support streaming audio?
No, the API does not support streaming or WebSocket connections. Audio is returned as a complete file in the response. You receive the full audio data after synthesis completes. This is suitable for batch processing and standard API integrations where real-time partial audio is not required.
How do I rotate my API key?
Issue a new key from your account dashboard. The new key becomes active immediately. The old key stops working at once upon issuance. You can rotate keys any time without downtime. Ensure your applications update to use the new key promptly to avoid authentication errors.
What is the default voice if none is specified?
If no voice is specified, the system defaults to a standard voice preset. The specific default is not explicitly named in the documentation, but you should always set the voice field for consistent results. The eight available presets include aria, nova, luna, sage, felix, milo, atlas, and orion.
Can I specify a speed for the voice?
Yes, you can set the speed between 0.25 and 4.0. Adjust this parameter to make the speech faster or slower. This allows you to fine-tune the output for different use cases, such as voice assistants or audiobooks. The speed change applies to the entire generated audio file.
What audio formats are supported?
The API supports mp3, wav, opus, flac, and pcm formats. Select the desired format in the response_format parameter. Each format serves different needs, from compact file sizes to lossless quality. The generated audio is returned directly in the response body or as a downloadable file.
How do I handle rate limit errors?
The limit is 60 requests per minute per key. If you exceed this, you will receive a rate limit error. Implement exponential backoff in your application to retry requests. Monitor your usage to stay within limits. New accounts start with a 10 requests per minute limit until the first top-up.
Is the API documentation versioned?
The API endpoint is v1. The documentation covers the current v1 endpoints. While specific version history is not detailed, the base URL includes the version number. This ensures stability and predictable behavior for integrations relying on the current API specification.
Do I need a subscription to use the API?
No monthly plans or subscriptions are required. You pay per character used at $10 per million characters. Start with a free trial credit if signing in with Google. Top up using USDT on TRON when needed. There are no minimum spends or seat limits.
How do I troubleshoot a 401 error?
A 401 error indicates an authentication issue. Verify your API key is correct and active. Ensure you are using the Bearer token format in the Authorization header. Check if the key was rotated or if the account has sufficient balance. Regenerate the key if necessary.
First request
curl
curl https://api.mally168casino.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.mally168casino.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.mally168casino.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
To use the VocalMesh API, you need an API key. Sign up at /get-api-key/ using Google or email to generate your key. This key authenticates all requests.
Generate API Key
Create an account via Google or email/password on the get-api-key page. Your unique key appears immediately for use.
- One active key per account
- Available immediately after sign-up
Bearer Token Format
Include your key in the Authorization header as a Bearer token: Authorization: Bearer tts-....
Key Rotation Policy
Issue a new key anytime via the dashboard. The old key stops working immediately upon rotation.
Endpoint Structure
VocalMesh offers three primary endpoints to manage your text-to-speech integration. The core synthesis endpoint handles audio generation, while the metadata endpoints provide voice options and model details. All endpoints use standard HTTP methods and return JSON or binary audio data.
POST /v1/audio/speech
This endpoint accepts JSON input and returns an audio file. You specify the model, voice, and text input. The API processes requests sequentially, so queue times may occur under high load. Text is limited to 4096 characters per request.
- Accepts JSON body with text, voice, and format parameters
- Returns audio file in the requested format
- Processes one request at a time
GET /v1/voices
Retrieve the list of available voices, languages, and formats. This endpoint helps you select the appropriate voice for your bot’s tone. Each voice supports all 23 supported languages, allowing for flexible multilingual deployments.
- Lists all 8 voice presets
- Shows supported languages and formats
- Includes pricing information (flat rate per character, not per voice)
GET /v1/models
View available models and their specifications. Currently, two models are available: tts-1 and tts-1-hd. Both use the same engine and pricing, offering flexibility in quality and speed based on your needs.
- Lists tts-1 and tts-1-hd models
- Shows model details and pricing
- Provides version information
Request Parameters
The API accepts two model variants, tts-1 and tts-1-hd, which share the same engine and pricing. Select the standard model for efficient batch processing in high-volume chatbot workflows.
Input text is limited to 4096 characters per request. For longer dialogues, split the text into chunks and join the resulting audio files. Spaces and punctuation count toward this limit.
Model Selection (tts-1)
Choose tts-1 for standard quality or tts-1-hd for higher fidelity. Both use identical underlying engines and incur the same cost of $0.01 per 1,000 characters.
The model field is a simple string parameter. There are no complex configuration options; just select the desired quality tier.
- Use
tts-1for most voice assistant responses. - Use
tts-1-hdfor premium, high-fidelity narration.
Input Text Limits
Each request can process up to 4096 characters. If your bot needs to speak longer passages, split the input into multiple requests.
Character counting includes all spaces and punctuation marks. Ensure your code truncates or splits text precisely at this boundary to avoid errors.
Voice and Language Settings
Select from eight distinct voices, such as aria for clear narration or atlas for neutral news delivery. Any voice can speak any of the 23 supported languages.
Set the language parameter with an ISO code (e.g., en, fr, de) for non-English Latin-script text. If omitted, the system guesses the language, defaulting to English for Latin scripts.
Supported languages include Arabic, Chinese, English, German, Japanese, Spanish, and others. Vietnamese and Thai are not yet supported.
- 8 voice presets available.
- 23 languages supported.
- Voice can speak any supported language.
Response Formats
The API returns audio data directly in the response body, eliminating the need for separate download steps. Supported formats include MP3, WAV, OPUS, FLAC, and PCM, allowing seamless integration into various chatbot and voice assistant frameworks. Each generated file includes an inaudible watermark to identify synthetic speech.
For errors, the API returns a JSON object with specific error codes and messages. Standard HTTP status codes indicate success or failure, ensuring predictable behavior during integration. This structure simplifies debugging and automated error handling in conversational AI workflows.
Audio File Delivery
Audio is delivered as binary data within the HTTP response body. Choose formats like MP3 for bandwidth efficiency or WAV for uncompressed quality. The response header specifies the content type, enabling direct processing in most modern SDKs.
- MP3, WAV, OPUS, FLAC, PCM
- Binary payload in response body
- Inaudible synthetic watermark included
JSON Error Responses
Errors return a JSON structure with an 'error' key containing the message and code. This allows for straightforward parsing in client applications. Failed requests do not incur charges, ensuring cost efficiency during debugging.
- JSON structure with error details
- Standard error codes
- Failed requests are free
Status Codes
HTTP 200 indicates successful synthesis. HTTP 4xx errors relate to authentication or input limits, while 5xx errors indicate server issues. Use these codes to implement retry logic or user feedback in your bot.
- 200: Success
- 4xx: Client errors
- 5xx: Server errors
Using the OpenAI SDK
Since our API mirrors the OpenAI speech endpoint structure, you can reuse the official OpenAI SDKs with minimal configuration. This allows your team to leverage existing familiarity and code patterns without learning a new client library.
Simply point the SDK’s base URL to our API endpoint. The authentication and request shapes remain identical to what you already know, ensuring a smooth integration for your bot’s voice features.
Base URL Configuration
Set the base URL to https://api.mally168casino.com/v1. This directs all requests to our text-to-speech service while maintaining compatibility with standard OpenAI SDK methods.
Client Initialization
Initialize the client using your API key. The key format is tts-... and is passed via the Authorization header. Ensure your key is active and has sufficient balance before generating audio.
Code Example
Below is a Python example using the OpenAI SDK to generate speech. It sends text to the tts-1 model and returns the audio file for playback in your chatbot.
- import openai
- client = openai.OpenAI(base_url='https://api.mally168casino.com/v1', api_key='tts-your-key')
- response = client.audio.speech.create(
- model='tts-1',
- voice='nova',
- input='Hello, how can I help you today?'
- )
- response.content.to_file('output.mp3')

Curl Example for Quick Test
Use this curl command to verify your API key and generate speech instantly. It sends a short test phrase to the speech endpoint, returning an audio file you can save locally for immediate validation.
Basic Curl Command
Run the following command, replacing YOUR_API_KEY with your key from the dashboard. The request uses the tts-1 model and the 'nova' voice in English.
- curl -X POST "https://api.mally168casino.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello, this is a quick test of VocalMesh.", "voice": "nova", "response_format": "mp3"}' \ -o test_audio.mp3
Response Handling
A successful request returns HTTP 200 with the binary audio data saved to test_audio.mp3. If the key is invalid or the balance is insufficient, you will receive a JSON error object with a clear message.
Audio Playback
Play the generated file using any standard media player to verify voice quality and latency. This confirms your integration is working before you scale to longer texts or other voices.
Rate Limits and Quotas
Understanding rate limits is crucial for maintaining smooth audio generation in your bot workflows. VocalMesh enforces strict quotas to ensure fair usage and consistent performance across all accounts. These limits apply per API key, so managing your key distribution is essential for high-volume teams.
Knowing how to handle throttling prevents your conversational AI from stalling. By anticipating request spikes and adjusting your sending strategy, you can keep your voice assistant responsive without wasting characters on failed attempts or unnecessary retries.
60 Requests Per Minute
Once your account is funded, you can send up to 60 requests per minute. This capacity is sufficient for most large-scale bot deployments, allowing you to generate natural-sounding responses quickly without overwhelming the infrastructure. Each request processes one text input up to 4,096 characters.
Requests are processed sequentially. Under heavy load, your request may wait in a queue, so plan your throughput accordingly.
- Limit: 60 requests/minute per key
- Processing: Sequential queue under load
- Scope: Per active API key
10 RPM Before Top-Up
New accounts start with a lower limit of 10 requests per minute. This allows you to test the integration and verify voice quality without excessive cost. Once you add credit via USDT, the limit automatically increases to 60 RPM.
This tiered approach lets you validate your bot’s voice integration before committing to higher volumes. You can send test phrases to ensure the tone and timing fit your conversational design before scaling up.
- Initial limit: 10 requests/minute
- Upgrade: Automatic upon top-up
- Verification: Ideal for testing
Handling Throttling
If you exceed the limit, the API returns a 429 Too Many Requests error. Your bot should handle this gracefully by waiting a few seconds before retrying. Do not immediately spam the endpoint; a brief pause helps avoid repeated failures.
Implementing exponential backoff is recommended. This strategy reduces server load and ensures your bot resumes normal operation smoothly once the queue clears. Monitor your usage dashboard to stay within safe limits and avoid unexpected delays in voice responses.
- Error: 429 Too Many Requests
- Strategy: Wait and retry
- Best practice: Exponential backoff
Error Handling
Robust error handling ensures your bot maintains a smooth conversational flow even when synthesis fails or limits are reached. Our API returns standard HTTP status codes with clear JSON messages, allowing your backend to distinguish between transient network issues and permanent configuration errors.
Common Error Codes
We use standard HTTP codes to indicate success or failure. A 200 OK means your audio file is ready. A 401 Unauthorized indicates an invalid or expired API key, while a 429 Too Many Requests signals that you have exceeded your rate limit. Detailed error messages in the JSON body help you identify the exact cause quickly.
- 401 Unauthorized: Invalid or missing API key
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Temporary processing issue
Retry Logic
For transient errors like 500, implement exponential backoff. Retry up to three times before failing the request and returning a fallback message to your user. This prevents your bot from appearing broken during brief spikes in server load. For 429 errors, wait for the duration specified in the Retry-After header before sending the next request.
Character Limit Errors
Each request supports a maximum of 4,096 characters. If your input text exceeds this limit, the API returns a 400 Bad Request error. Split your long dialogues into smaller chunks before sending them to ensure consistent synthesis quality and avoid truncation. Remember that spaces and punctuation count toward this limit.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Our AI team will seamlessly integrate the voice assistant for our entire organization.
23 languages
Any voice speaks any of these languages.
