Frequently asked questions
How do I get an API key?
Sign up on the /get-api-key/ page using Google or email plus password. Your account displays the active key, balance, and usage details. Accounts created with email and password start without trial credit, while Google sign-ins receive $0.50 valid for seven days. You can issue a new key at any time, immediately invalidating the old one.
What is the base URL for the API?
The API base URL is https://api.xx18.info/v1. You send POST requests to https://api.xx18.info/v1/audio/speech. Other endpoints include GET /v1/voices and GET /v1/models. Use this base URL when configuring your HTTP client or SDK to ensure requests reach the correct endpoint for speech synthesis.
Which models are available?
Two models are available: tts-1 and tts-1-hd. Both use the same engine and price point. Select either model in your request body. The choice does not affect cost or voice characteristics, only the underlying processing. Both models support the standard request fields including input text, voice selection, and speed adjustments.
Can I use the OpenAI SDK with this API?
Yes, the official OpenAI SDKs work by changing the base_url to https://api.xx18.info/v1. Use your site-specific key for authentication. The request shape matches the OpenAI speech endpoint exactly. This allows you to use familiar SDK methods without rewriting your integration logic, ensuring compatibility with existing code structures.
What audio formats are supported?
Supported formats are mp3, wav, opus, flac, and pcm. Specify your preferred format in the response_format field. Each format serves different use cases, from web playback to high-quality archival. The API returns the audio file directly in the response, ready for immediate playback or storage by your application.
How do I set the voice speed?
Set the speed between 0.25 and 4.0 using the speed field. This adjusts the playback rate of the generated audio. Values below 1.0 slow the speech, while values above 1.0 accelerate it. The default speed provides natural pacing, but you can fine-tune it for specific content requirements.
How do I specify the language?
Use the optional language field with an ISO code. 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 to ensure accurate synthesis. Supported languages include Arabic, Chinese, English, French, German, Spanish, and others.
What happens if I exceed the rate limit?
The limit is 60 requests per minute per key. Before your first top-up, the limit is 10 requests per minute. If you exceed the limit, requests may queue or fail. Failed requests are free, so you are not charged for attempts that do not complete successfully.
Are spaces counted in the character limit?
Yes, spaces and punctuation count as characters. The limit is 4096 characters per request. This includes every character in your input text. Plan your text length accordingly, especially for dense content. Accurate character counting ensures you stay within limits and avoid unexpected truncation or errors during synthesis.
How do I handle long texts?
Split texts into parts of up to 4096 characters. Generate audio for each part separately. Then join the resulting audio files to create a continuous track. This approach ensures each request stays within limits while allowing you to synthesize content of any length efficiently and without data loss.
Is the API key unique per account?
Yes, each account has one active key. You can issue a new key at any time. When a new key is generated, the old one stops immediately. This ensures secure access control. You can rotate keys regularly without downtime, as the new key becomes active instantly upon creation.
Can I rotate my API key?
Yes, you can issue a new key at any time from your dashboard. The new key becomes active immediately, and the old one stops working at once. This allows seamless rotation without interrupting ongoing services. Use this feature to enhance security or recover from potential key exposure.
What is the difference between tts-1 and tts-1-hd?
Both models use the same engine and price. Both models produce audio with the same quality and cost. The distinction is purely nominal for compatibility with OpenAI SDKs. You can use either model interchangeably without affecting the output characteristics or your billing rate.
How do I interpret error codes?
Standard HTTP status codes indicate success or failure. Failed requests are free, with charges returned in full. Check the response body for specific error details. Common issues include rate limits, invalid parameters, or authentication errors. Use the /get-api-key/ page to verify your key and balance if issues persist.
First request
curl
curl https://api.xx18.info/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.xx18.info/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.xx18.info/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
Access the /get-api-key/ page to create your account via Google or email. Upon sign-in, you receive a unique API key starting with tts-. This key authenticates your requests to the API base URL.
Include the key in the Authorization header as Bearer tts-.... Only one key is active per account; generating a new one immediately invalidates the previous key.
Generate Your API Key
Visit the /get-api-key/ page and sign up using Google or an email/password combination. Your account is specific to this site. Once registered, your API key is displayed immediately alongside your balance and usage stats.
Bearer Token Usage
Every request to https://api.xx18.info/v1 must include the header Authorization: Bearer tts-<your-key>. The system validates this token before processing your text-to-speech request.
Key Rotation and Expiry
You can issue a new key at any time from your dashboard. When a new key is generated, the old one stops working immediately. There is no expiry date for keys, and balance does not expire.
Endpoints Overview
Our API exposes three primary endpoints for synthesizing audio, discovering available voices, and checking model details. Each endpoint is designed for straightforward integration with standard HTTP clients and the official OpenAI SDKs.
The core speech synthesis endpoint accepts text and configuration parameters, returning an audio file directly. The metadata endpoints allow you to list available voices, languages, and formats, or retrieve model details, ensuring you have the necessary information to configure your requests correctly.
POST /v1/audio/speech
This is the primary endpoint for generating audio. Send a POST request with a JSON body containing the text, voice, model, and format preferences. The API processes the request and returns the synthesized audio file in the specified format.
Ensure your text does not exceed 4096 characters. If your text is longer, split it into chunks and join the resulting audio files.
- Accepts JSON body with
model,input,voice,response_format, andspeed. - Returns audio file in MP3, WAV, OPUS, FLAC, or PCM.
- Supports speed adjustment from 0.25 to 4.0.
GET /v1/voices
Retrieve a list of all available voices, their associated languages, and supported output formats. This endpoint helps you choose the right voice for your specific use case, such as customer notifications or internal communications.
The response includes details about each voice, its style, and the languages it can speak.
- Lists 8 voice presets: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion.
- Shows supported languages and formats for each voice.
- Useful for dynamic voice selection in your application.
GET /v1/models
Access information about the available models, including tts-1 and tts-1-hd. Both models use the same engine and pricing, so you can choose based on your quality preferences.
This endpoint is useful for verifying model availability and understanding the underlying technology powering your audio generation.
- Lists
tts-1andtts-1-hdmodels. - Both models share the same engine and price.
- Useful for checking model status and details.
Request Parameters
The API accepts two model identifiers, "tts-1" and "tts-1-hd". Both utilize the identical underlying engine and incur the same usage charges, offering flexibility without cost differentiation.
Text input is capped at 4,096 characters per request. Longer messages must be split and concatenated by the client application to ensure seamless playback.
Model Selection: tts-1 and tts-1-hd
Both models use the same engine and pricing tier. Both models use the same engine and pricing tier, so you can select either identifier without affecting your bill.
Input Text Limit: 4096 Characters
Each request supports up to 4,096 characters, including spaces and punctuation. For notifications exceeding this limit, split the text into chunks and join the resulting audio files sequentially.
- Count characters carefully; spaces and punctuation are included in the limit.
Voice Selection: 8 Presets
Choose from eight distinct voices ranging from warm narrators to deep documentary tones. All voices support 23 languages, allowing consistent tone across international fintech notifications.
Voices are derived from licensed LibriTTS-R and LibriVox recordings, ensuring clear, professional audio suitable for customer alerts.
- 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
Response Formats
The TTS API returns synthesized audio directly in the response body, eliminating the need for polling or secondary download endpoints. You specify the desired format via the response_format parameter, allowing seamless integration with existing audio processing pipelines in fintech notification systems.
MP3, WAV, OPUS, FLAC, PCM Support
Choose from five standard audio formats to balance quality and bandwidth. MP3 and OPUS offer efficient compression for large-scale notification broadcasts, while WAV, FLAC, and PCM provide lossless or uncompressed audio for high-fidelity compliance recordings or immediate playback in customer apps.
- MP3: Compatible with most web and mobile players.
- WAV/FLAC: Lossless quality for archival or premium notifications.
- PCM: Raw uncompressed data for custom processing pipelines.
Audio Response
The API returns the audio file directly in the response body. This direct delivery means you can stream the data immediately to the client or save it to your storage without waiting for a separate download link, simplifying the integration workflow for real-time voice alerts.
Error Response Structure
Errors follow a standard JSON structure, including a message and type field, making debugging straightforward. Failed requests are free, ensuring you are not charged for errors like invalid parameters or exceeded limits, though the response still returns the relevant HTTP status code (e.g., 400, 429).
Speed and Language Settings
Adjust the pacing of your fintech notifications with the speed parameter, supporting values from 0.25 to 4.0. This flexibility allows you to optimize audio delivery for various customer contexts, from slow, clear instructional messages to rapid transactional alerts, ensuring the synthetic voice matches your team's communication style without losing clarity.
Adjustable Speed from 0.25 to 4.0
Use the speed field in your request to control generation pace. Values below 1.0 slow the speech, while values above 1.0 accelerate it. This helps balance comprehension with efficiency, especially when processing high-volume customer updates or complex financial data readings.
- Minimum speed: 0.25 for slow, detailed narration
- Maximum speed: 4.0 for rapid, concise updates
- Default speed: 1.0 for standard pacing
Optional Language Code Specification
Specify the language field with an ISO 631 code to ensure accurate pronunciation across our 23 supported languages, including Arabic, Chinese, German, Hindi, and Spanish. Explicitly setting the language prevents misinterpretation, particularly when text contains mixed scripts or ambiguous phrasing common in international banking communications.
- Supported languages: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
Auto-Detection for Latin Script
If the language field is omitted, the API attempts to detect the language based on the text script. Latin script text defaults to English. For non-English text using Latin characters, such as German or Dutch, always set the language parameter to ensure correct voice rendering and avoid unintended English pronunciation.

Example with cURL
The quickest way to verify your key is a single cURL command. This example sends a short text to the speech endpoint, demonstrating the basic structure required for any integration.
Ensure your API key is correctly formatted in the Authorization header. The response will return the audio file directly, allowing you to save it immediately for testing.
Basic Request Structure
Send a POST request to https://api.xx18.info/v1/audio/speech. The body must be JSON containing the model, input text, voice, and response format.
Headers and Payload
Include Authorization: Bearer tts-your-key-here and Content-Type: application/json. The payload specifies model as tts-1, voice as nova, and input as your text.
Handling the Response
On success, the API returns the audio file with the specified content type (e.g., audio/mpeg). Save this output to a file like speech.mp3.
Integration with OpenAI SDK
Leverage the official OpenAI SDKs by simply redirecting the client to our infrastructure. Since our request schema mirrors the OpenAI speech endpoint, you can integrate our TTS API into existing codebases with minimal changes, primarily by updating the base URL configuration.
Changing the Base URL
Point your SDK client to https://api.xx18.info/v1 instead of the default OpenAI endpoint. This single configuration change routes your requests through our API while maintaining the standard request structure you already know.
Using Official SDKs
Use the official OpenAI SDK for your preferred language. Pass your tts-... API key in the Authorization header as usual. The SDK handles serialization and retries automatically, ensuring reliable delivery of your audio synthesis requests.
- Supports Python, Node.js, and other official OpenAI SDK languages
- Compatible with standard
base_urloverrides - No custom library installation required
Compatibility Notes
Our API accepts the same model names (tts-1, tts-1-hd) and parameters as the OpenAI speech endpoint. However, we do not offer streaming or SSML support, so ensure your application handles complete audio file responses rather than partial streams.
Common Errors and Limits
Rate limits enforce a ceiling of 60 requests per minute per key, dropping to 10 per minute until your first top-up. Under heavy load, requests queue sequentially, so long texts may take slightly longer as they process one after another.
Authentication failures return a 401 status if the Bearer token is missing or invalid. You can rotate your key instantly via the dashboard, immediately invalidating the old token.
Rate Limit Exceeded (429)
If you exceed 60 requests per minute, the API returns a 429 error. Remember that each split part of a long text counts as a separate request. Monitor your usage dashboard to stay within these bounds.
Invalid API Key (401)
A 401 error indicates an unauthorized request. Ensure your Authorization header uses the correct Bearer token format: Authorization: Bearer tts-.... If your key was rotated, the previous token stops working immediately.
Text Too Long (400)
The API accepts up to 4096 characters per request. If your input exceeds this limit, you receive a 400 error. Split your text into smaller chunks and join the resulting audio files manually.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. This selection covers many major markets, though it may not meet the needs of services requiring less common languages.
23 languages
Any voice speaks any of these languages.
