Frequently asked questions
What is the API endpoint?
Send text to POST https://api.xda777.cc/v1/audio/speech. The request body is JSON containing the model, input text, voice, response format, and optional speed or language parameters. This endpoint generates the audio file directly. You can also use GET /v1/voices to list available voices and GET /v1/models to check model details.
Does it work with OpenAI SDKs?
Yes. The request shape matches the OpenAI speech endpoint. You can use official OpenAI SDKs by changing the base_url to https://api.xda777.cc/v1 and using your VoiceOps API key. This allows you to leverage existing client libraries without rewriting your integration code or adopting a new SDK.
How do I authenticate?
Include your API key in the Authorization header as a Bearer token: Authorization: Bearer tts-... . Each account has one active key at a time. If you issue a new key, the old one stops working immediately. You can find your key on the /get-api-key/ dashboard page.
What models are available?
Two models are available: tts-1 and tts-1-hd. Both use the same engine and have the same price. You can select either model in your request body. Use GET /v1/models to verify current model status. The choice between them does not affect pricing or voice capabilities.
Can I change the speed?
Yes, you can adjust the speed between 0.25 and 4.0. This parameter allows you to slow down or speed up the speech output. It applies to all voices and models. Set the speed value in your request body to customize the playback rate for your specific use case.
How do I set the language?
Pass an optional ISO language code in the request body. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language parameter. Supported languages include English, Spanish, French, German, and others listed in the voices endpoint.
What formats are supported?
You can request audio in mp3, wav, opus, flac, or pcm formats. Specify your preferred format in the response_format field of the request body. The API returns the generated audio file in the requested format. This flexibility allows you to choose the best format for your application's needs.
What happens if I exceed the rate limit?
The limit is 60 requests per minute per key, or 10 per minute before your first top-up. Exceeding this limit may result in delayed processing or errors. Requests are processed sequentially, so high load can cause queuing. Monitor your usage on the dashboard to stay within limits.
Are requests processed in real-time?
Requests are processed sequentially, not in parallel. For long texts, generation takes roughly real-time speed (25 characters per second). Short phrases may take a few seconds. Under load, requests may wait in a queue. This means total time depends on queue depth and text length.
How do I handle errors?
Failed requests are free, and the charge is returned in full. If synthesis fails, you receive an error response without being billed. Check the response status code and message to diagnose issues. Ensure your text is under 4096 characters and your API key is valid before retrying.
Is there a JSON response?
The primary response is the audio file itself in the requested format. Metadata such as time, characters, and status are kept for billing but are not returned in the audio response. You can retrieve usage details via the dashboard or API endpoints. The audio data is the main output.
Do I need to install a specific SDK?
No. You can use the official OpenAI SDKs by changing the base URL, or use plain HTTP requests. There is no proprietary VoiceOps SDK required. Any HTTP client capable of sending JSON and handling binary audio responses will work. This keeps your stack flexible and simple.
Can I use the same key for multiple apps?
Yes, you can use your single active API key across multiple applications. However, all apps share the same rate limit of 60 requests per minute. If you need higher throughput, consider splitting usage or using multiple keys. The key is tied to your account, not a specific app.
How do I rotate my API key?
You can issue a new key at any time from the /get-api-key/ page. When you generate a new key, the old one stops working immediately. This ensures secure rotation without downtime. You can manage your key directly from the dashboard.
First request
curl
curl https://api.xda777.cc/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.xda777.cc/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.xda777.cc/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 single active API key per account, passed in the Authorization header as a Bearer token. This key grants access to the speech endpoint and voice metadata, enabling your product team to integrate voice synthesis directly into chatbot workflows without managing complex credential chains.
The key is displayed on your dashboard alongside your balance and usage statistics. It serves as the sole credential for all API interactions, ensuring that every request is tracked against your specific account limits and billing cycle.
Bearer Token
Include your key in the HTTP header using the format Authorization: Bearer tts-.... This standard header is compatible with the OpenAI SDKs, allowing you to change the base_url to https://api.xda777.cc/v1 and use existing client libraries without rewriting authentication logic.
The token validates your identity and deducts credits from your balance. Failed requests do not consume credits, but the token itself remains valid until you rotate or revoke it.
- Format:
Authorization: Bearer tts-<your-key> - Supported by OpenAI Python and Node.js SDKs
- Single active token per account
Key Management
Your API key is visible on the /get-api-key/ dashboard page, where you can also monitor your character usage and remaining balance. The key is tied to your account, whether created via Google sign-in or email registration.
You can view your current key alongside a ready-to-use cURL example. The key does not expire, but it can be invalidated immediately if you choose to rotate it.
- Visible on the dashboard
- Tied to your specific account
- No expiration date
Key Rotation
You can issue a new API key at any time from your dashboard. Upon issuing a new key, the previous one stops working immediately, ensuring no overlap or accidental usage of old credentials.
This feature is useful for security or when rotating keys between development and production environments. The transition is instant, with no downtime for new requests using the new token.
- Instant invalidation of old key
- New key issued via dashboard
- No downtime for new tokens
Base URL Configuration
Configure your requests to the base URL https://api.xda777.cc/v1. This endpoint handles all speech synthesis and voice metadata operations. The API follows the standard REST structure, ensuring that your existing integration logic remains intact while switching providers.
The architecture mirrors the OpenAI speech endpoint, allowing developers to use official OpenAI SDKs by simply updating the base_url configuration. This compatibility reduces integration time for teams already familiar with standard TTS workflows.
Endpoint Address
Direct all POST requests to https://api.xda777.cc/v1/audio/speech. Metadata for available voices and models is accessible via GET /v1/voices and GET /v1/models. Ensure your application routes traffic exclusively to this domain to avoid version mismatches.
- POST https://api.xda777.cc/v1/audio/speech
- GET https://api.xda777.cc/v1/voices
- GET https://api.xda777.cc/v1/models
SDK Compatibility
The API accepts standard JSON bodies identical to the OpenAI speech endpoint. You can use the official OpenAI Python or Node.js SDKs by setting the base_url to https://api.xda777.cc/v1 and providing your Bearer token. No custom client libraries are required.
This approach allows product teams to swap the endpoint without rewriting request serialization logic. The same request shape applies whether you are generating short phrases or long narrative texts.
Versioning
The API is versioned under the /v1/ path prefix. While the current version is stable, all requests must include the /v1/ segment in the base URL. Future major updates will likely introduce a new prefix (e.g., /v2/), requiring a simple URL update in your configuration.
Using the explicit version path ensures that your voice assistant or chatbot continues to function correctly during minor backend updates without breaking changes to the request schema.
Request Parameters
Configure the synthesis engine and voice character for each request. The API accepts two model identifiers, tts-1 and tts-1-hd, which utilize the same underlying engine and pricing tier. Select the identifier that best fits your latency and quality requirements without affecting the cost per character.
Model Selection
Both tts-1 and tts-1-hd map to the same engine and price point. This design simplifies integration, allowing you to swap models for quality testing without altering your billing logic or request structure.
Voice Presets
Choose from eight licensed presets, including female voices like Aria and Nova, and male options like Felix and Atlas. Each voice is engineered for specific tones, from warm narration to energetic promo, ensuring consistent character across your voice assistant or chatbot interactions.
- Female: aria, nova, luna, sage
- Male: felix, milo, atlas, orion
Input Text Limits
Each request supports up to 4,096 characters of input text. For longer scripts, split the text into chunks of this size and concatenate the resulting audio files. Spaces and punctuation count toward this limit.
Response Formats
The API returns synthesized audio as binary data within the HTTP response body. You can select the output format via the response_format field to match your application’s requirements, choosing between compressed and uncompressed standards.
MP3 Output
MP3 is the default format, offering a balance of file size and quality. It is widely supported by web browsers and media players, making it ideal for voice assistants and chatbot integrations where bandwidth efficiency matters.
WAV and FLAC
Choose WAV for uncompressed, lossless audio suitable for high-fidelity recording or further processing. FLAC provides lossless compression, reducing file size while maintaining exact audio fidelity, which is useful for archiving or detailed acoustic analysis.
Opus and PCM
Opus offers high-quality audio at low bitrates, suitable for constrained network environments. PCM provides raw, uncompressed audio data, useful for debugging or when your infrastructure requires uncompressed byte streams.
Speed and Language Control
VoiceOps allows fine-tuning of speech tempo via the speed parameter, accepting values from 0.25 to 4.0. Adjusting speed helps align synthetic narration with your application’s pacing requirements without altering voice character.
Speed Multiplier
Set the speed field in your request body to modify the playback rate. A value of 1.0 is standard; higher values accelerate the voice, while lower values slow it down. This control is essential for maintaining natural rhythm in long-form content or matching specific UI interaction timings.
- Supported range: 0.25 to 4.0
- Standard rate is 1.0
- No audio quality loss within valid range
Language Code
Specify the language parameter using a standard ISO code (e.g., 'en', 'de', 'ja') to ensure accurate pronunciation. While the system guesses language from script, explicit codes prevent errors for Latin-script texts that might otherwise default to English, ensuring clarity for Arabic, Chinese, or mixed-language inputs.
- Use ISO 639-1 codes
- Supports 23 languages including Hindi, Swahili, and Turkish
- Explicit codes recommended for ambiguous scripts
Auto-Detection
If the language field is omitted, the API infers the language from the input text script. Latin characters default to English. For non-English languages using Latin script, such as Turkish or Malay, explicitly setting the language code is necessary to avoid incorrect voice synthesis.
- Latin script defaults to English
- Inference is script-based, not semantic
- Explicit codes are safer for mixed languages

Rate Limits and Quotas
VoiceOps enforces a strict rate limit of 60 requests per minute per API key to ensure stable synthesis performance. This cap applies uniformly across all endpoints, so high-volume product teams should monitor their usage to avoid temporary throttling during peak integration periods.
Requests Per Minute
Each active key allows up to 60 synthesis requests within a sliding 60-second window. If you exceed this threshold, subsequent requests will receive a 429 Too Many Requests error until the window resets. This limit ensures consistent audio generation quality regardless of concurrent load.
- Standard limit: 60 requests/minute/key
- Error response: HTTP 429
- Applies to all API endpoints
Pre-Trial Limits
New accounts without a top-up are restricted to a lower baseline of 10 requests per minute. This reduced capacity helps prevent accidental resource exhaustion during initial testing phases. Once you top up via USDT (TRC-20), the limit automatically increases to the standard 60 requests per minute.
- Pre-top-up limit: 10 requests/minute
- Post-top-up limit: 60 requests/minute
- Automatic adjustment upon payment
Queue Processing
Requests are processed sequentially rather than in parallel. Under heavy load, a request may wait in a queue before synthesis begins. This ensures deterministic output but can increase latency for bursty traffic patterns, so batch processing is recommended for large text libraries.
Error Handling
The API returns standard HTTP status codes to indicate request outcomes. A 200 OK confirms successful synthesis, while 4xx errors (such as 400 Bad Request or 401 Unauthorized) indicate client-side issues like invalid keys or malformed JSON. Server errors (5xx) are rare but may occur during peak load.
Failure Refunds
If synthesis fails, the charge is returned in full. The system automatically returns the full charge for that request. You are only billed for successfully generated audio files, ensuring you pay strictly for usable output.
Retry Logic
Implement exponential backoff for transient errors (429 Too Many Requests or 5xx Server Errors). Respect the Retry-After header if provided. Avoid rapid retries, as requests are processed sequentially and may queue under load. For persistent 4xx errors, check your request parameters before retrying.
Example Code Snippets
The API accepts standard JSON payloads, making integration straightforward for engineering teams. You can generate audio by sending a POST request with your model, voice, and input text. The endpoint returns the audio file directly, which you can then stream or save for your voice assistant or chatbot.
Below are concrete examples using cURL and the OpenAI SDKs. These snippets demonstrate how to authenticate with your Bearer token and configure the request parameters. Replace the placeholder keys and text with your actual data before testing.
cURL Command
Send a basic synthesis request using the command line. Ensure your API key is set correctly in the Authorization header.
- `curl -X POST https://api.xda777.cc/v1/audio/speech -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" -d '{"model": "tts-1", "voice": "nova", "input": "Hello, how can I help you?"}'`
OpenAI SDK Python
Use the official OpenAI Python library by pointing it to our base URL. This approach simplifies handling the audio response stream or saving the file directly to disk.
OpenAI SDK Node.js
Initialize the client with our API base URL and your key. The code below shows a standard synchronous call to generate audio from a short string.
- `const audio = await client.audio.speech.create({ model: "tts-1", voice: "nova", input: "Hello, how can I help you?" });`
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Unsupported languages like Vietnamese or Thai will not generate audio.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- W3C WAI: making audio and video accessible
- OpenAI API reference: create speech
- LibriTTS-R paper (arXiv 2305.18802)
- ISO 639 language codes
- FFmpeg documentation
- Tether (USDT)
- MDN: Web Speech API
- LibriTTS-R corpus (OpenSLR 141)
- Creative Commons Attribution 4.0
- IETF RFC 7845: Ogg Opus
- Python documentation
