Frequently asked questions
How do I authenticate?
Include an Authorization: Bearer tts-... header in your requests. Each account has one active key. You can issue a new key at any time via the dashboard, which immediately invalidates the previous key.
What models are available?
Two models exist: tts-1 and tts-1-hd. Both use the same engine and pricing. Select the model in the JSON request body. The /v1/models endpoint lists current availability.
Can I use the OpenAI Python SDK?
Yes. The API matches the OpenAI speech endpoint shape. Change the SDK's base_url to https://api.ar66apk.com/v1 and use your FableTone key. No custom SDK is required.
What is the base URL?
The base URL is https://api.ar66apk.com/v1. Use POST for speech generation and GET for voices or models. All requests must include your Bearer token in the headers.
How do I change the voice?
Set the voice field in the request body to one of eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Each voice supports all 23 languages.
What speeds are supported?
Speed ranges from 0.25 to 4.0. Adjust this parameter to slow down or speed up the narration. Values outside this range may be rejected.
Which audio formats are available?
Supported formats are mp3, wav, opus, flac, and pcm. Specify the desired format using the response_format field in your JSON request body.
What happens on rate limit?
Limits are 60 requests per minute per key (10 before top-up). Exceeding this returns an error. Failed requests are free. Queue processing may cause delays under load.
How do I split long texts?
Split input into parts of up to 4096 characters. Generate audio for each part separately. Then join the resulting audio files client-side. This ensures all text is processed correctly.
Is there a WebSocket endpoint?
No. There is no WebSocket or streaming endpoint. Audio is returned as a complete file in the HTTP response. You must wait for the full synthesis to complete.
Do I need an API key for every request?
Yes. Every request must include the Authorization: Bearer header with your active key. The key is tied to your account balance and usage limits for billing and tracking.
Can I rotate API keys?
Yes. Issue a new key from the dashboard at any time. The old key stops working immediately. This allows seamless rotation without downtime for your applications or services.
What is the max input length?
The maximum input length is 4096 characters per request. For longer texts, split the content into chunks of this size and process them individually to generate continuous audio.
First request
curl
curl https://api.ar66apk.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.ar66apk.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.ar66apk.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
The FableTone API uses standard Bearer token authentication. Include your API key in the Authorization header of every request: Authorization: Bearer tts-.... This key identifies your account and tracks usage against your balance.
Bearer Token Usage
Pass your key as a Bearer token in the HTTP header. The format is Authorization: Bearer <your_key>. Ensure the key is transmitted securely over HTTPS.
Key Management
Each account holds one active API key. You can generate a new key at any time via the dashboard. The previous key stops working immediately upon issuance of the new one.
- Generate keys via /get-api-key/
- Issue new keys anytime
Single Active Key
Only one key is active per account. Revoking or issuing a new key invalidates the old one instantly. This ensures clear audit trails for billing and usage tracking.
Endpoints
The FableTone API exposes three core endpoints for generating speech and retrieving metadata. The primary endpoint, POST /v1/audio/speech, accepts text and parameters to return audio files. GET /v1/voices lists available presets and their supported languages, while GET /v1/models confirms the current engine versions.
POST /v1/audio/speech
Send a JSON payload with your text (up to 4096 characters) and desired parameters. The API returns the audio file directly in the response body. Specify the model, voice, and output format within the request.
GET /v1/voices
Retrieve a list of all 8 voice presets and their attributes. This endpoint helps you verify which voices support the 23 languages you need for your audiobook or story app.
GET /v1/models
Check the available models, such as tts-1 and tts-1-hd. Both use the same engine and pricing, allowing you to switch quality levels without changing your integration logic.
Request Parameters
Configure generation parameters via the JSON request body. Specify the model, voice preset, audio format, and optional speed or language constraints to control output characteristics.
Model Selection
Use "tts-1" or "tts-1-hd" for identical engine quality and pricing. Select the model that matches your latency requirements without affecting cost.
Voice Presets
Choose from eight licensed presets: aria, nova, luna, and sage (female); felix, milo, atlas, and orion (male). All voices support all 23 languages. Set the language ISO code explicitly for non-English Latin text to ensure accurate pronunciation.
- 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
Speed Control
Adjust playback speed between 0.25 and 4.0. This parameter scales the audio duration without changing pitch, allowing you to fit narration into specific time windows for interactive story apps.
Response Formats
The API returns audio files directly in the response body, eliminating the need for separate download steps. You can select the output format that best fits your application’s playback engine and storage constraints, ensuring efficient delivery of synthesized speech.
MP3 Output
MP3 is the default and most widely supported format. It provides a good balance between audio quality and file size, making it ideal for mobile apps and web players. This format is recommended for most children’s story applications where bandwidth efficiency matters.
WAV and FLAC
WAV and FLAC offer lossless audio quality. WAV is uncompressed and universally compatible, while FLAC provides compression without data loss. These formats are suitable for archival purposes or when high fidelity is required for audiobook distribution.
PCM Raw Audio
PCM returns raw uncompressed audio data. Use this format if you need to apply custom processing or encoding to the audio before saving it. It provides the rawest form of the generated speech.
Rate Limits
FableTone enforces a rate limit of 60 requests per minute per API key. This ceiling ensures stable synthesis performance for indie developers generating audiobooks or interactive story content without overwhelming the processing queue.
60 Requests Per Minute
The standard limit allows 60 API calls per minute. This capacity supports typical development workflows where multiple short phrases or story segments are generated in quick succession.
Initial 10 RPM Limit
New accounts start with a 10 requests per minute limit. This restriction applies until you make your first top-up. Once credited, the limit increases to the standard 60 RPM.
- Starts at 10 RPM
- Increases to 60 RPM after first top-up
- Applies per API key
Queue Behavior
Requests are processed sequentially. Under load, synthesis jobs may wait in a queue before processing begins. Short phrases typically take a few seconds, while longer texts generate at roughly real-time speed (25 characters per second).

Error Handling
Error responses include standard HTTP status codes and a code field for specific failure reasons. Failed synthesis requests are free: if synthesis fails, the charge is returned in full.
Implement exponential backoff for transient 429 or 500 errors. Avoid immediate retries for 400-level errors, as they indicate invalid parameters or voice identifiers that will fail again immediately.
Common Error Codes
Use the code field in the JSON response to handle errors programmatically. Common codes include invalid_request_error for malformed payloads and voice_not_found for unrecognized voice IDs.
- 400 Bad Request: Invalid JSON or missing required fields.
- 401 Unauthorized: Expired or incorrect Bearer token.
- 429 Too Many Requests: Rate limit exceeded (60 RPM).
- 500 Internal Server Error: Temporary synthesis failure.
Retry Logic
Retry on 429 or 500 errors with exponential backoff. Do not retry on 400 errors, as the input is definitively incorrect.
Invalid Requests
Ensure the input text is under 4096 characters. Requests exceeding this limit return a 400 error. Verify that the voice parameter matches one of the 8 available presets.
OpenAI SDK Integration
Since the FableTone endpoint mirrors the OpenAI speech API structure, you can leverage the official OpenAI SDK with minimal configuration. Simply override the base_url to point to the FableTone API domain, allowing you to use familiar client methods without rewriting your integration logic.
This approach lets indie developers maintain their existing codebase while switching providers. It ensures compatibility with standard libraries and reduces boilerplate code for audio generation requests.
Base URL Configuration
Configure the SDK client to use https://api.ar66apk.com/v1 as the base URL. This directs all requests to the FableTone TTS engine while retaining the standard request shape expected by the OpenAI library.
Client Initialization
Initialize the client using your API key, ensuring it starts with tts-. The library will handle authentication headers automatically.
Code Examples
Use the AudioResponse format to receive binary audio data. Pass your text input and desired voice preset (e.g., aria or atlas) directly into the speech method. The SDK handles the JSON serialization and response parsing seamlessly.
Curl Examples
Use cURL to verify your integration quickly. These examples cover standard synthesis, language specification, and speed tuning using the official endpoint structure.
Basic Request
Generate speech using the default model and voice. Replace YOUR_API_KEY with your token from the dashboard.
- curl -X POST "https://api.ar66apk.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Once upon a time, there was a little fox.", "voice": "luna", "response_format": "mp3"}'
With Language Code
- curl -X POST "https://api.ar66apk.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Le petit renard court vite.", "voice": "nova", "language": "fr", "response_format": "mp3"}'
With Speed Adjustment
Adjust playback speed between 0.25 and 4.0. Useful for syncing audio with visual animations in interactive stories.
- curl -X POST "https://api.ar66apk.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "The dragon flew over the mountain.", "voice": "atlas", "speed": 1.5, "response_format": "mp3"}'
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Spaces and punctuation count toward this total, ensuring predictable billing without hidden fees for specific vocal styles.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- OpenAI API reference: create speech
- Node.js documentation
- openai-node on GitHub
- IETF RFC 7845: Ogg Opus
- LibriTTS-R paper (arXiv 2305.18802)
- curl documentation
- LibriTTS-R corpus (OpenSLR 141)
- W3C WAI: making audio and video accessible
- Python documentation
- Creative Commons Attribution 4.0
- TRON developer hub: TRC-20
