Frequently asked questions
What is the base URL for the API?
The API base URL is https://api.lecowboy.cc/v1. You send POST requests to the /audio/speech endpoint. This URL structure matches the OpenAI speech endpoint, allowing you to use standard HTTP libraries or compatible SDKs by simply pointing your client to this address for all TTS operations.
How do I set the voice parameter?
Set the voice parameter to one of eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Each voice has a distinct tone, from warm narrators to deep documentary styles. You can also optionally specify a language ISO code to ensure correct pronunciation for non-English text.
Can I use the OpenAI Python SDK?
Yes, the official OpenAI SDKs work perfectly. You just need to change the base_url to https://api.lecowboy.cc/v1 and provide your API key. The request shape is identical to the OpenAI speech endpoint, so your existing code will function without modification after updating the endpoint configuration.
What is the maximum text length per request?
The maximum input text length is 4096 characters per request. Spaces and punctuation count toward this limit. If your chapter exceeds this length, you must split the text into smaller chunks, generate audio for each, and then join the resulting audio files manually or via script.
How do I handle rate limits in my code?
You are limited to 60 requests per minute per key (10 before the first top-up). Implement exponential backoff in your code to handle 429 Too Many Requests errors. Since requests are processed sequentially, queueing may occur under load, so your client should handle retries to avoid wasting credits.
What formats are supported for output?
Supported output formats are mp3, wav, opus, flac, and pcm. Specify your preferred format in the response_format field of your JSON request body. MP3 is recommended for general use due to its balance of quality and file size, while WAV or FLAC suits lossless archival needs.
Is the API key case-sensitive?
Yes, your API key is case-sensitive. It starts with 'tts-' and is sent in the Authorization header as 'Bearer tts-...'. Ensure you copy the key exactly as displayed on your dashboard to avoid authentication errors when generating audio files.
How do I split text for long chapters?
Split your text into parts of up to 4096 characters. Send each part as a separate POST request to the speech endpoint. Once you receive the audio files for each chunk, join them in order using an audio library or tool. Failed requests are free, so you can retry safely.
Does the API support async requests?
The API processes requests one after another in a queue. There is no dedicated asynchronous endpoint or WebSocket stream. You can send multiple requests concurrently from your client, but they will be synthesized sequentially on the server, which may introduce latency for large batches during high load.
What happens if the API is down?
If the API is unavailable, you will receive an error response. Failed synthesis requests are free, and any charge is returned in full if the failure occurs during processing. There is no SLA or uptime guarantee, so plan for potential delays or outages when scheduling your audiobook generation.
Can I change my API key if it's compromised?
Yes, you can issue a new API key at any time from your dashboard. The old key stops working immediately when the new one is activated. This ensures your account remains secure.
How do I specify the speed of narration?
Set the speed parameter between 0.25 and 4.0 in your request JSON. The default speed is 1.0. Adjusting this allows you to create faster summaries or slower, more detailed narrations. The engine handles pitch and timing automatically to maintain natural speech quality across different speeds.
Is there a limit on concurrent requests?
There is no explicit limit on the number of concurrent requests you can send from your client. However, requests are processed sequentially on the server. Under heavy load, your requests may wait in a queue, increasing the total time to generate long texts compared to real-time speed.
Do I need to install specific libraries?
No specific library is required. You can use any HTTP client, such as Python’s requests or the OpenAI Python SDK. Since the API uses standard JSON and HTTP methods, you can generate audio using basic programming tools or even command-line utilities like curl without installing specialized TTS packages.
First request
curl
curl https://api.lecowboy.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.lecowboy.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.lecowboy.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 |
Get Your API Key
Start by visiting the /get-api-key/ page to create your account. You can register using your Google account for instant access, or use a standard email and password combination. This step establishes your identity within the VoxaRead system.
Sign up on the /get-api-key/ page
Navigate to the registration page to begin. The interface is designed for simplicity, allowing you to get started without technical friction. This is the first step toward generating your first audiobook chapter.
Choose Google or email registration
You have two options: Google sign-in for speed or email/password for traditional control. Note that Google sign-ups receive a $0.50 free trial credit valid for 7 days, while email accounts start without trial credit.
Copy your key from the dashboard
Once registered, your unique API key appears on the dashboard. Copy this key, which starts with 'tts-', and keep it secure. You will use this Bearer token to authenticate all your TTS requests.
- Keys are unique per site account
- A new key instantly invalidates the old one
- One active key per account
Your First API Request (cURL)
Once you have your API key from the dashboard, you can generate your first audiobook chapter immediately. The process is straightforward: send a POST request to the speech endpoint with your text and preferred voice settings. This method works for any text under 4096 characters, making it perfect for short narrations or chapter segments.
You can test this directly in your terminal using cURL. The API returns an audio file in the response body that you can save locally. Since the format matches standard TTS requests, you can integrate this into your existing workflow without learning a new protocol.
POST to /v1/audio/speech endpoint
Direct your request to https://api.lecowboy.cc/v1/audio/speech. This is the single entry point for generating audio. You do not need to manage separate endpoints for different voices or models; the model field inside the JSON body handles that distinction.
The endpoint accepts standard HTTP POST methods. Ensure your client sends the payload as application/json. This simplicity means you can use basic command-line tools or simple scripts to automate your audiobook production pipeline.
- Endpoint:
https://api.lecowboy.cc/v1/audio/speech - Method:
POST - Content-Type:
application/json
Include your Bearer token in headers
Authentication is handled via the Authorization header. Use your unique API key, which starts with tts-, formatted as a Bearer token. This ensures your usage is tracked against your account balance and rate limits.
Without this header, the API will reject your request with a 401 error. Keep your key secure, as it is the only active key for your account until you issue a new one.
- Header:
Authorization: Bearer tts-... - Key format:
tts-prefix - One active key per account
Send text in the JSON body
The core of your request is the JSON body containing the text to be spoken. Include the input field with your narrative text. You can also specify voice (e.g., aria, nova), model (tts-1 or tts-1-hd), and response_format.
For example, sending a short paragraph with the 'nova' voice in mp3 format will return the audio data immediately. Remember that spaces and punctuation count toward the 4096 character limit per request.
input: Your text stringvoice: e.g., 'aria', 'nova'model: 'tts-1' or 'tts-1-hd'response_format: 'mp3', 'wav', etc.
Integration with OpenAI SDK
Leverage your existing OpenAI SDKs by simply pointing them to our infrastructure. This allows you to use familiar code structures for generating audiobook chapters without learning a new library. The integration requires minimal configuration changes to your development environment.
Change the base_url to our API domain
Update your client configuration to use https://api.lecowboy.cc/v1 as the base URL. This directs all API calls to our servers while maintaining standard authentication via your Bearer token.
Use standard OpenAI Python/JS SDKs
Install the official OpenAI Python or JavaScript SDK as usual. Import the Speech class and initialize the client with your API key. The library handles serialization and retries automatically.
- Python:
openaipackage - JavaScript:
openainpm package
Same request shape as OpenAI Speech
Pass your text, chosen voice, and desired format using the standard parameters. The API expects the same JSON structure, ensuring your existing scripts work immediately without modification.
- Input text up to 4096 characters
- Voice presets like 'aria' or 'nova'
- Formats: mp3, wav, opus, flac, pcm
Supported Request Parameters
The API accepts two model options: tts-1 and tts-1-hd. Both utilize the same underlying engine and pricing structure, allowing you to choose based on your quality preference without worrying about cost differences.
You can select from eight distinct voice presets, ranging from the warm narration of Aria to the deep documentary tone of Orion. Each voice supports all 23 available languages, ensuring consistent quality across your audiobook projects regardless of the language spoken.
Model: tts-1 or tts-1-hd
Both tts-1 and tts-1-hd use the identical engine and incur the same charge of $10 per million characters. Both models use the same engine and price; choose based on your preference.
Voice: Select from 8 presets
Select one of eight licensed voices, derived from LibriTTS-R and LibriVox public-domain readings. Options include female voices like Aria (warm narrator) and Nova (upbeat), or male voices like Atlas (neutral news) and Orion (deep documentary). Every voice can speak any of the 23 supported languages.
- 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 format: mp3, wav, opus, flac, pcm
Specify your desired audio format in the response_format field. Available options are mp3, wav, opus, flac, and pcm. Choose MP3 for efficient storage and easy sharing, or WAV/FLAC if you need uncompressed, high-quality files for professional editing. PCM provides raw audio data if your pipeline requires it.
Handling Long Texts
Since the API limits each request to 4096 characters, you must split your manuscript into smaller segments before sending them. This ensures every chunk fits within the single-request boundary without truncation or errors.
Split text into 4096 character chunks
Divide your input text into parts of up to 4096 characters each. Spaces and punctuation count toward this limit, so ensure your splitting logic accounts for all characters to stay within the boundary.
Generate audio for each part
Send each chunk to the POST /v1/audio/speech endpoint. The API processes requests sequentially, so longer texts may queue under load. Each successful request returns an audio file corresponding to that specific segment.
Join files programmatically for final book
Once all segments are generated, concatenate the audio files in order to create your final audiobook. This approach works for any format, allowing you to assemble the complete narration.

Rate Limits and Throttling
Managing your API key’s throughput is essential for generating audiobooks efficiently. Our system enforces specific request limits to ensure stable service during high-volume narration tasks, allowing you to plan your generation batches accordingly.
60 requests per minute per key
Once your account is active, you can send up to 60 requests per minute. This limit applies per API key, so if you are generating chapters with a single key, you have a steady stream of audio files.
10 requests per minute before first top-up
New accounts start with a lower limit of 10 requests per minute. This allows you to test the API with your free trial credit without overwhelming the system before you add funds.
Queue processing under heavy load
Requests are processed sequentially. If you send many chunks quickly, they may wait in a queue. Longer texts take time to generate, so plan your splits to avoid bottlenecks.
Error Handling and Status Codes
Every API call returns a standard HTTP status code indicating whether the synthesis succeeded or failed. A 200 OK response returns the audio file, while non-2xx codes signal issues like invalid parameters or quota exhaustion.
Check response status for success/failure
Inspect the response header to confirm the request was processed. A 200 status returns the audio binary, while other codes indicate specific errors such as bad JSON or invalid parameters.
- 200: Success, audio data included
- 400: Bad request, check parameters
- 401: Unauthorized, verify your Bearer token
- 429: Too many requests, check rate limits
Failed requests are free
If synthesis fails due to a server error or invalid input, you are not charged for those characters. The API ensures you only pay for successful audio generations, protecting your balance during development.
Retry logic for transient errors
Implement exponential backoff for 5xx server errors or temporary rate limits. Since requests are processed sequentially, short delays help manage queue wait times during high load periods.
Voice and Language Selection
For self-pub authors, accurate language detection is critical. If your manuscript is in Spanish, French, or German, you must explicitly set the language parameter to the correct ISO code. Without this, the API guesses based on the script, defaulting to English for Latin characters, which often results in incorrect pronunciation for non-English texts.
Set language ISO code for non-English
Always specify the language field for any text not in English. Our API supports 23 languages, including Arabic, Chinese, Hindi, Japanese, and Russian. This ensures the chosen voice pronounces names and terms correctly, maintaining the integrity of your narration.
- Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish.
Default to English for Latin script
If you omit the language parameter, the system assumes English for any Latin-script input. This is convenient for English-only manuscripts but risky for mixed-language texts. For example, a French phrase in a Latin script text will be read as English unless you specify language: 'fr'.
Use voice names like 'aria' or 'nova'
Select from eight presets to match your book's tone. For warm, clear narration, use aria. For bright, upbeat content, try nova. Other options include luna for storytelling, sage for instructional content, and male voices like felix, milo, atlas, and orion for various styles.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Selecting the right female voice sets the emotional baseline for your audiobook.
23 languages
Any voice speaks any of these languages.
