Frequently asked questions
What is the correct base_url for the OpenAI SDK?
Set the base_url to https://api.7z777casino.com/v1. This allows you to use the official OpenAI SDKs by simply changing the endpoint configuration. You must also update the Authorization header to use your Bearer key. The request body shape remains identical to the standard OpenAI speech endpoint, ensuring a smooth integration for existing developers.
How do I handle rate limit errors in Python?
Your key allows 60 requests per minute (10 before the first top-up). If you hit the limit, implement exponential backoff in your Python script. Process requests sequentially or use a queue to stay under the 60 requests per minute threshold. Failed requests are free, though the facts do not explicitly state whether they consume your rate limit.
Can I use the API with JavaScript?
Yes, you can use the API with JavaScript. Since the endpoint matches the OpenAI speech format, you can use the OpenAI JavaScript SDK by setting the base_url to https://api.7z777casino.com/v1. Alternatively, you can use standard HTTP libraries like fetch to send POST requests with your Bearer token and JSON body parameters.
What is the maximum input length per request?
The maximum input length is 4096 characters per request. If your text exceeds this limit, you must split it into parts of up to 4096 characters. Generate audio for each part separately and then join the resulting audio files to create the final audiobook file for your children's stories.
Do I need to encode the input text?
You do not need to manually encode the input text. Send the text directly in the JSON body under the 'input' field. The API handles the encoding internally. Ensure your text is within the 4096 character limit and properly formatted as a standard string in your request payload.
How do I specify a language in the request?
Include the 'language' field in your JSON body with the ISO code, such as 'en' or 'de'. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly setting the language parameter ensures accurate pronunciation and voice selection.
What happens if I exceed the character limit?
If you exceed the 4096 character limit, the request will fail. You must split your text into smaller chunks of up to 4096 characters. Generate audio for each chunk individually and then concatenate the audio files. This ensures all your content is processed correctly without truncation or errors.
Is the API key case-sensitive?
Yes, the API key is case-sensitive. When authenticating, ensure you use the exact key provided in your account dashboard. The key starts with 'tts-'. If you generate a new key, the old one stops immediately. Always verify the key string to avoid authentication errors during your API calls.
Can I stream the audio response?
No, streaming is not supported. The API returns the complete audio file in the response body after processing. You cannot receive partial audio chunks in real-time. You must wait for the full synthesis to complete before receiving the file, which may take a few seconds for short phrases or longer for extensive texts.
How do I debug a failed request?
Check the HTTP status code and response body for error details. Failed requests are free, so no charge is applied. Ensure your Authorization header is correct and the input text is under 4096 characters. Verify that the voice and model parameters are valid. Contact support via email if the issue persists.
First request
curl
curl https://api.7z777casino.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.7z777casino.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.7z777casino.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 API Keys
The FableVoice API uses standard bearer token authentication. Upon signing up via Google or email on the /get-api-key/ page, you receive a unique key starting with "tts-". This key authenticates all requests to the API base URL.
Generate your API key
Create an account on /get-api-key/ using Google or email. Your key appears immediately on the dashboard alongside your balance and usage stats. Google sign-in includes a $0.50 trial credit valid for 7 days, while email accounts start without credit.
- Google sign-up includes $0.50 trial credit (7 days)
- Email sign-up starts with zero balance
- Keys are displayed securely on the dashboard
Bearer token usage
Include your key in the HTTP header as Authorization: Bearer tts-.... This token is required for every request to the /v1/audio/speech endpoint. Keep it secure and avoid sharing it in public repositories.
- Format:
Authorization: Bearer tts-<your-key> - Required for all API calls
- One active key per account
Key rotation process
Generate a new key from your dashboard at any time. The new key becomes active immediately, and the old one stops working at once. This allows seamless rotation without downtime for your audiobook production pipeline.
- Generate new key from dashboard
- Old key invalidates instantly
- No downtime during rotation
First Request with cURL
Getting started is straightforward. You send a POST request to the speech endpoint with your API key in the Authorization header. The service returns the audio file directly, allowing you to integrate it into your publishing workflow immediately.
This guide covers the essential cURL commands to generate your first audio file. You will learn the required parameters and how to interpret the response to ensure your fairy tale audio is generated correctly.
Basic JSON payload structure
To generate audio, send a POST request to https://api.7z777casino.com/v1/audio/speech. The body must be JSON containing the model, input text, and voice preset. Keep text under 4096 characters per request.
Required fields: model, input, voice
- model: Use "tts-1" or "tts-1-hd".
- input: Your story text.
- voice: Choose from presets like aria or luna.
- response_format: Specify mp3, wav, opus, flac, or pcm.
Response format examples
On success, you receive the audio binary. If synthesis fails, you receive a JSON error object, and the request remains free of charge. Always check the HTTP status code to confirm delivery.

OpenAI SDK Integration
Our API mimics the OpenAI speech endpoint structure, allowing you to leverage familiar SDKs. By simply adjusting the base_url to https://api.7z777casino.com/v1, you can use the official OpenAI SDKs to generate audiobooks for children's stories without learning a new client library.
Setting the base_url
Configure your SDK client to point to our API base URL. This single change directs requests to our infrastructure while maintaining standard request shapes for the /v1/audio/speech endpoint.
Using official SDKs
You can use the official OpenAI SDKs directly. This eliminates the need for a custom SDK or additional dependencies, speeding up integration for your publishing pipeline.
- Use standard JSON payloads
- Support for Python and Node.js clients
- No custom client required
Compatibility notes
The endpoint shape is identical to the OpenAI speech endpoint. Ensure your key starts with tts- and passes via the Authorization header. Rate limits apply per key, so monitor usage during batch audiobook generation.
Supported Audio Formats
The API accepts four standard audio formats for your generated speech files: mp3, wav, opus, and flac. Each format serves specific needs for audiobook production, from web delivery to archival storage.
MP3 for web streaming
Use MP3 for efficient web delivery. It offers a good balance between file size and audio quality, making it suitable for standard playback.
WAV for high quality
Choose WAV when you need uncompressed audio data. This format preserves the raw PCM data without additional lossy compression layers, ensuring maximum fidelity for professional editing.
FLAC for lossless archives
Select FLAC for lossless archives that occupy less disk space than WAV. It maintains perfect audio quality while reducing storage requirements for long-form children's stories.
Rate Limits and Throttling
Your API key allows 60 requests per minute once funded. This limit applies uniformly across all your endpoints, ensuring consistent performance for your audiobook production workflows. You can monitor your usage directly from your dashboard to stay within these bounds.
60 requests per minute limit
After your first top-up, you may send up to 60 requests per minute. This throughput is sufficient for most publishing schedules, allowing you to generate chapters efficiently without waiting for external approvals or payment processing delays.
10 requests per minute initially
Before your first top-up, your key is limited to 10 requests per minute. This lower threshold remains active until you add credit via USTRC-20. Once the transfer is confirmed, your rate limit automatically increases to the full 60 requests per minute.
Handling 429 errors
If you exceed the allowed requests, the API returns a 429 Too Many Requests error. Requests are processed sequentially, so under load, a request may wait in a queue rather than being immediately rejected. Implementing exponential backoff in your client code helps manage these pauses smoothly.

Error Handling and Codes
The API uses standard HTTP status codes to indicate request outcomes, allowing your application to handle failures programmatically. Failed synthesis requests incur no charge, with any applied fees refunded automatically to your balance.
Understanding these error responses helps you maintain smooth audiobook production workflows without unnecessary costs or interruptions.
Invalid API key errors
Return a 401 status if the provided Bearer token is missing, expired, or incorrect. Ensure your key starts with tts- and matches the account associated with the request.
- Verify the
Authorization: Bearer tts-...header format. - Generate a new key via the dashboard if the old one was revoked.
Rate limit exceeded errors
Return a 429 status if you exceed 60 requests per minute (or 10 per minute for new accounts without top-ups). Requests are processed sequentially, so queueing delays may also occur under load.
- Implement exponential backoff when receiving 429 errors.
- Monitor your usage dashboard to stay within limits.
Malformed request errors
Return a 400 status if the JSON body is invalid, the text exceeds 4096 characters, or the voice model is unknown. Ensure all required fields like model, input, and voice are present.
- Check that
inputdoes not exceed 4096 characters. - Verify
response_formatis one of mp3, wav, opus, flac, or pcm.
Voice and Model Selection
Choosing between our models is straightforward: both tts-1 and tts-1-hd use the same engine and price point. You can select either based on your preference without worrying about cost differences, as both are billed at $0.01 per 1,000 characters. The choice depends purely on your audio quality requirements for specific fairy tale scenes.
Selecting the right voice preset involves picking from eight distinct styles. For children's stories, aria offers a warm, clear narration, while luna provides a soft, storytelling tone. Other options include nova for upbeat segments, sage for instructional parts, or male voices like atlas for neutral news-style readings or orion for deeper documentary styles.
Choosing between tts-1 and tts-1-hd
Both tts-1 and tts-1-hd models operate on the same engine with identical pricing. This means you can switch between them without affecting your billing rate of $0.01 per 1,000 characters. Use tts-1 for standard production and tts-1-hd if you prefer higher fidelity for special editions.
Selecting the right voice preset
We provide eight voice presets tailored for various storytelling needs. Female voices include aria (warm narrator), nova (bright and upbeat), luna (soft storyteller), and sage (calm instructor). Male options feature felix (energetic promo), milo (friendly conversation), atlas (neutral news), and orion (deep documentary). Each voice can speak any supported language.
All eight voices support all 23 listed languages, allowing consistent character voices across different language versions of your books. If you do not specify a language, the system guesses from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language field to ensure accuracy.
- 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
Language code specifications
The API supports 23 languages, including English, Spanish, French, German, Chinese, Japanese, and others. Voices are not language-specific; any voice can speak any supported language. For non-English texts using Latin script, always set the language parameter to avoid incorrect English defaults.
Unsupported languages include Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, and Bengali. Ensure your text falls within one of the 23 supported languages to avoid synthesis issues. The language field accepts standard ISO codes.

Advanced Usage Examples
For publishers producing full audiobooks, text must be split into segments of 4,096 characters. Since the API processes requests sequentially under load, parallel submissions simply queue; they do not bypass the 60 requests per minute limit or the single-file processing order. You must join the resulting audio files to create a seamless narrative.
Splitting long texts
Divide your manuscript into chunks no larger than 4,096 characters. Spaces and punctuation count toward this limit. Generate each part individually, then concatenate the audio files using standard media tools. This ensures stable generation times, as short phrases typically take a few seconds, while longer texts process at roughly real-time speed.
Adjusting speed parameters
Use the speed field to control playback rate between 0.25 and 4.0. For fairy tales, a moderate speed of 1.0 or 1.2 often works well, while instructional content might benefit from slower pacing. Adjusting speed does not change the character count or cost, but it affects the final audio duration significantly.
Batch processing requests
Submit multiple requests concurrently to utilize your 60 requests per minute allowance efficiently. Remember that under load, these requests queue sequentially. Monitor your usage dashboard to track characters consumed and ensure you stay within the rate limits to avoid delays in audiobook production.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. We seek vibrant tales for young readers that ignite wonder and foster lifelong love of reading.
23 languages
Any voice speaks any of these languages.
