Frequently asked questions
How do I get an API key?
Sign up on the /get-api-key/ page using Google or an email and password. Your account is specific to this site. The dashboard displays your active API key, current balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the previous one.
What SDKs are supported?
The API follows the same request shape as the OpenAI speech endpoint. This means the official OpenAI SDKs work seamlessly by changing the base_url to https://api.xs666ok.com/v1 and using your site-specific key. You can also use plain HTTP requests for maximum flexibility.
Does ClearSpeech have its own SDK?
No, we do not have an official SDK of our own. We rely on the existing OpenAI SDKs or standard HTTP libraries. There is also no mobile SDK, WordPress plugin, or browser extension. You can integrate using any language that supports JSON over HTTP.
What is the base URL?
The API base URL is https://api.xs666ok.com/v1. All endpoints, such as /audio/speech and /voices, are relative to this base. Ensure your SDK or HTTP client is configured to use this exact URL to avoid connection errors or authentication failures.
How do I send a request with cURL?
Use a POST request to /v1/audio/speech. Include your key in the Authorization header. The JSON body requires the model, input text, voice, and response format. For example: curl -X POST https://api.xs666ok.com/v1/audio/speech -H "Authorization: Bearer tts-..." -d '{"model": "tts-1", "input": "Hello", "voice": "nova"}'.
What formats are supported?
You can request audio in mp3, wav, opus, flac, or pcm formats. Specify the desired format using the response_format field in your request body. This allows you to choose the best balance between file size and quality for your specific application needs.
What is the character limit?
Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer texts, split them into parts of up to 4096 characters and join the resulting audio files manually to create a complete audio file.
How do I handle rate limits?
The limit is 60 requests per minute per key. New accounts start with 10 requests per minute until the first top-up. If you exceed this, requests may queue or fail. Monitor your usage via the dashboard and implement exponential backoff in your client code.
What happens if I exceed the limit?
Requests are processed sequentially, so under load a request may wait in a queue. If the queue fills or you exceed the strict rate limit, the request may fail. Failed requests are free, and the charge is returned in full if synthesis fails.
Is the API RESTful?
Yes, the API is RESTful. It uses standard HTTP methods like POST for speech generation and GET for retrieving voices and models. It returns JSON responses for metadata endpoints and binary audio for speech generation, using standard HTTP status codes to indicate success or failure, making it easy to integrate with any REST client.
Do I need SSML?
No, SSML is not supported. You cannot use SSML tags for pronunciation or pauses. The API processes plain text input. If you need precise control over timing or pronunciation, you may need to split your text into multiple requests or adjust the speed parameter.
Can I control speed?
Yes, you can control the speech speed using the speed parameter. Valid values range from 0.25 to 4.0. The default speed is 1.0. Adjusting this allows you to make the speech faster or slower to better fit your application's context or user preferences.
What is the default language?
If the language field is not set, the system guesses the language from the script. Latin script text defaults to English. For non-English Latin-script text, you should explicitly set the language parameter to ensure correct pronunciation and avoid misinterpretation by the synthesis engine.
How do I detect language?
You can specify the language using an ISO code in the language field. If omitted, the system guesses based on the script. Latin defaults to English. Supported languages include Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish.
First request
curl
curl https://api.xs666ok.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.xs666ok.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.xs666ok.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 |
Quickstart Guide
ClearSpeech provides a lightweight TTS API tailored for SaaS notifications and interface audio. Indie developers can generate human-sounding audio files in seconds using simple HTTP requests or familiar OpenAI SDKs. The service offers straightforward pricing at $10 per million characters, with a free trial credit available upon Google sign-in.
Getting started requires minimal setup. You will receive a single API key to manage all requests, with usage limits and billing details visible directly in your dashboard. This quickstart guides you through retrieving your key, making your first request, and integrating the SDK into your workflow.
Get Your API Key
Navigate to /get-api-key/ and sign in using Google or an email address. Your dashboard displays your active API key, current balance, and a ready-to-use cURL example. Note that accounts created with email/password start without the $0.50 trial credit, while Google sign-ins receive it automatically for seven days.
- Sign up at /get-api-key/
- Use Google or email/password authentication
- Retrieve key from dashboard
First cURL Request
Send a POST request to https://api.xs666ok.com/v1/audio/speech. Include your text in the input field, select a voice from the eight presets, and specify the model (tts-1 or tts-1-hd). The API returns the audio file in your chosen format, such as mp3 or wav. Remember that texts are limited to 4096 characters per request.
- Endpoint: POST /v1/audio/speech
- Auth: Bearer tts-... key
- Input: text up to 4096 chars
Using OpenAI SDK
Leverage the official OpenAI SDKs by changing the base_url to https://api.xs666ok.com/v1 and using your ClearSpeech key. This allows you to use familiar code structures for speech generation. Ensure you pass the correct model and voice parameters to match our endpoint requirements. This method simplifies integration for developers already using OpenAI tools.
- Change base_url to api.xs666ok.com/v1
- Use standard OpenAI SDK methods
- Pass correct model and voice params
Authentication
Secure your API key on the /get-api-key/ dashboard. Use it in the Authorization header as Bearer tts-... for every request to https://api.xs666ok.com/v1.
Bearer Token
Include the header Authorization: Bearer tts-<your-key> in all API calls. The key grants access to your account’s balance and usage limits.
API Key Management
Each account holds one active key. You can generate a new key at any time via the dashboard, which instantly invalidates the previous one.
- One active key per account
- Instant invalidation of old keys
- No concurrent key usage
Key Revocation
Revoking or replacing a key stops its access immediately. This is useful if your key is exposed or if you want to reset your session without deleting the account.
Endpoints
The core of ClearSpeech is generating audio from text. You send a JSON payload to the speech endpoint, specifying the model, voice, and language. The API returns the audio file directly in the response body, ready for immediate playback or storage in your SaaS application.
Two companion endpoints help you discover available voices and model configurations. These GET endpoints return JSON metadata, allowing you to build dynamic voice selection menus or verify supported formats without making actual synthesis requests.
POST /v1/audio/speech
Send text up to 4096 characters. The endpoint returns audio in the requested format. Use the OpenAI SDK by setting the base URL to https://api.xs666ok.com/v1.
Supports MP3, WAV, OPUS, FLAC, and PCM. You can adjust speed between 0.25 and 4.0. The model parameter accepts 'tts-1' or 'tts-1-hd' for identical pricing and quality.
- Input: text (max 4096 chars)
- Output: audio file (mp3/wav/opus/flac/pcm)
- Auth: Bearer token required
GET /v1/voices
Returns a list of all 8 voice presets with their metadata. Each voice includes a name, gender, and description. This endpoint helps you initialize your UI with available options.
Voices include female options like Aria and Nova, and male options like Felix and Milo. All voices support all 23 listed languages, regardless of the voice's native tone.
- 8 voice presets available
- All voices support 23 languages
- Metadata includes name and gender
GET /v1/models
Returns the available model versions. Currently, this includes 'tts-1' and 'tts-1-hd'. Both models use the same engine and pricing structure, so you can choose based on preference.
Use this endpoint to verify model availability before making synthesis requests. The response is a simple JSON array of model IDs.
- tts-1
- tts-1-hd
- Same pricing for both
Request Parameters
The ClearSpeech API offers two model variants, tts-1 and tts-1-hd, which share the same engine and pricing structure. Selecting one does not alter the cost per character, but allows you to choose the output quality directly within your request payload.
Model Selection
Both models support the full range of 8 voice presets and all 23 languages. Since the pricing is identical, you can swap between tts-1 and tts-1-hd without adjusting your budget calculations or character limits.
Input Text Limits
Each API call accepts up to 4096 characters, including spaces and punctuation. For longer texts, split your input into chunks and concatenate the resulting audio files. This ensures consistent generation speed and avoids timeout issues during high load.
- Maximum length: 4096 characters per request
- Spatial and punctuation characters count toward the limit
- Split long texts to maintain real-time generation speeds
Voice Selection
Choose from 8 distinct voices, ranging from the warm narration of aria to the deep documentary tone of orion. Every voice supports all 23 languages, though you should explicitly set the language parameter for non-English Latin text to ensure accurate pronunciation.
- 8 preset voices available
- All voices support 23 languages
- Set
languagefor non-English Latin scripts
Response Formats
The API returns binary audio data directly in the response body, allowing you to save the file immediately or play it in your application's audio player. You control the output format via the response_format parameter, which accepts mp3, wav, opus, flac, or pcm. This flexibility lets you balance file size, quality, and compatibility based on your specific SaaS notification or interface needs.
MP3 Output
MP3 is the default and most compatible format, ideal for web players and mobile apps. It offers a good balance between file size and audio quality, making it suitable for most use cases where storage efficiency matters.
WAV Output
WAV provides uncompressed, high-quality audio. Use this format when you need the best possible fidelity for professional interface sounds or when your downstream processing pipeline requires lossless input.
OPUS, FLAC, PCM
OPUS offers high efficiency for low-bandwidth scenarios. FLAC provides lossless compression, reducing storage needs while maintaining audio integrity. PCM returns raw uncompressed audio data, useful for real-time processing or custom audio pipelines.

Rate Limits
ClearSpeech enforces a standard rate limit of 60 requests per minute per API key. This cap ensures consistent performance for your SaaS notifications and interface audio, preventing sudden spikes from degrading service quality for other users. Under normal load, requests are processed sequentially, so longer texts may experience slight queuing delays.
New accounts start with a lower initial limit of 10 requests per minute until the first top-up is completed. This helps verify your integration works correctly without consuming too much trial credit. Once you add funds via USDT (TRC-20), your limit automatically increases to the full 60 requests per minute.
60 Requests Per Minute
The standard limit allows 60 API calls every minute. This is sufficient for most indie SaaS applications, especially when generating audio for user interfaces or periodic notifications. If your app sends many short phrases, consider batching or caching results to stay within this limit.
Initial Limit
Until you top up your account, you are limited to 10 requests per minute. This gentle start lets you test the integration thoroughly. You can generate a few test audio files to verify voice quality and latency before committing to higher usage volumes.
Limit Increases
After your first top-up of at least $5 USDT (TRC-20), your limit increases to 60 requests per minute. The increase is automatic and happens within minutes of the network confirming your transfer. There is no need to contact support or wait for manual review.
Error Handling
When generating audio, your request may fail due to network issues, invalid parameters, or server overload. We return clear HTTP status codes to help you diagnose the problem quickly without ambiguity.
Understanding these error states ensures your application handles failures gracefully, maintaining a smooth user experience even during high load periods.
Common Errors
The API returns standard HTTP codes. A 400 error indicates invalid input, such as text exceeding 4096 characters or an unsupported voice ID. A 401 error means your Bearer token is missing or expired. A 429 error signals you have hit the rate limit of 60 requests per minute.
- 400: Bad Request (invalid JSON or character limit exceeded)
- 401: Unauthorized (invalid or missing API key)
- 429: Too Many Requests (rate limit exceeded)
- 500: Internal Server Error (unexpected backend issue)
Retry Logic
For transient errors like 429 or 5xx codes, implement exponential backoff. Wait briefly before retrying to avoid overwhelming the queue. Since requests are processed sequentially, a short pause often resolves temporary congestion.
Do not retry 400 errors, as they indicate a configuration issue that will persist until you fix the input data.
Failed Request Refunds
Failed requests are free: if synthesis fails, the charge is returned in full. You are only billed for successfully generated audio files. This ensures you never pay for wasted compute time.
Language Support
ClearSpeech supports 23 languages, allowing any voice to speak any supported language. You can explicitly set the language using ISO codes or rely on automatic detection based on the input script.
ISO Language Codes
Pass the language parameter (e.g., "en", "fr") to force a specific language. This is essential for Latin-script text that isn't English, as the API defaults to English for unknown Latin scripts.
Automatic Detection
If you omit the language field, the system guesses it from the text script. For non-English Latin text, always specify the code to ensure correct pronunciation.
Supported Languages List
The API supports Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. It does not support Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali, or other languages.
- Arabic
- Chinese
- Danish
- Dutch
- English
- Finnish
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Streamline your workflow with intuitive alerts and clean dashboards tailored for solo builders.
23 languages
Any voice speaks any of these languages.
