Frequently asked questions
How do I get an API key?
Sign up at https://roman189.cc/get-api-key/ using Google or email. Google sign-ups receive a $0.50 trial credit valid for 7 days. Email accounts start without trial credit. You receive one active key per account, visible on the dashboard. You can issue a new key anytime, which immediately invalidates the old one.
What is the base URL for the API?
The API base URL is https://api.roman189.cc/v1. Send POST requests to https://api.roman189.cc/v1/audio/speech for synthesis. Use GET /v1/voices to list available voices and formats. Use GET /v1/models to view model details. All requests require an Authorization header with your Bearer token.
Can I use the official OpenAI SDK?
Yes. The request shape matches the OpenAI speech endpoint. Configure your OpenAI SDK by changing the base_url to https://api.roman189.cc/v1 and using your site-specific API key. This allows you to use the official SDKs directly without writing custom HTTP client code for basic integration.
What is the maximum character limit per request?
Each request supports up to 4096 characters in the input field. Spaces and punctuation count toward this limit. If your text exceeds 4096 characters, you must split it into smaller parts. Generate audio for each part separately and join the resulting audio files to create the full output.
Which models are available?
Two models are available: tts-1 and tts-1-hd. Both use the same engine and pricing structure. Select the model in your request body. The choice does not affect the cost, which is $10 per 1 million characters. Both models support all eight voice presets and all available output formats.
How do I set the language?
Include the optional language field with an ISO code in your request. 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 English, Spanish, German, and 20 others: Arabic, Chinese, Danish, Dutch, Finnish, French, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Swahili, Swedish, Turkish.
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. Exceeding the limit may cause requests to wait in a queue or fail. Failed requests are free.
How do I handle long texts?
Split your text into segments of up to 4096 characters. Send each segment as a separate POST request to the speech endpoint. Receive the audio file for each segment. Join the resulting audio files to create the final continuous audio track. This ensures reliable generation for manuscripts or long documents.
First request
curl
curl https://api.roman189.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.roman189.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.roman189.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 |
Authentication
Authentication is handled via a Bearer token included in the request header. Every API call requires a valid key to process your text-to-speech requests. Keep this key secure, as it controls your account’s usage and billing.
The system supports straightforward key management without complex permission scopes. You can generate a new key at any time from your dashboard, ensuring you maintain control over your API access.
API Key Header
Include your API key in the Authorization header of every request. Use the format Bearer tts-<your-key>. This standard header ensures the API identifies your account and applies the correct rate limits and billing rules to your requests.
The key is required for both the speech generation endpoint and the metadata endpoints. Without it, the API returns a 401 Unauthorized error, preventing any audio synthesis or voice list retrieval.
- Header: Authorization
- Value: Bearer tts-<key>
- Format: Standard Bearer token
Key Rotation
You can issue a new API key at any time from your account dashboard. This process is immediate and designed to maintain security without interrupting your workflow if you plan your rotation carefully.
Once a new key is generated, the previous key becomes invalid instantly. Ensure your applications are updated to use the new key before revoking the old one to avoid service interruption.
Single Key Policy
Each account is limited to one active API key at a time. This simplifies access management and billing tracking, as all usage is attributed to a single credential.
If you lose your key or suspect it has been compromised, generate a replacement immediately. The old key stops working at once, preventing unauthorized use of your balance.
Endpoints
The API exposes three core endpoints for generating audio and retrieving metadata. Use the speech endpoint to convert text into audio files, while the voices and models endpoints provide the available options for your requests.
All endpoints require authentication via the Authorization: Bearer header. The base URL for all requests is https://api.roman189.cc/v1.
Speech Generation
Send a POST request to /v1/audio/speech with your text payload. The service processes the input and returns the generated audio file in the specified format. This is the primary endpoint for converting manuscripts or short phrases into speech.
List Voices
A GET request to /v1/voices returns a list of available voice presets, their associated languages, supported formats, and pricing details. Use this endpoint to identify which voice ID matches your narrative tone needs before generating audio.
List Models
Call GET /v1/models to retrieve the available model identifiers. Currently, the system supports tts-1 and tts-1-hd, which share the same engine and pricing structure but offer different quality tiers.
Request Parameters
The API accepts plain text input up to 4096 characters per request. Each character, including spaces and punctuation, counts toward your usage bill.
Split longer manuscripts into segments that fit this limit, then concatenate the resulting audio files to produce a complete audiobook.
Input Text
Send the text to synthesize in the input field of the JSON body. The engine supports up to 4096 characters per request.
Voice Selection
Choose from eight preset voices using the voice parameter. Select female voices like aria (warm, clear narrator) or nova (bright, upbeat). Choose male voices like atlas (neutral, news) or orion (deep, documentary).
- 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
Specify the output file type via response_format. Available options include mp3, wav, opus, flac, and pcm. Select the format that best fits your production pipeline.
- mp3
- wav
- opus
- flac
- pcm
Optional Parameters
Optional parameters allow you to fine-tune the audio output without changing the core synthesis engine. Adjusting speed and language ensures the generated speech matches your specific narrative needs, while model selection determines the quality tier.
Speed Control
Use the speed parameter to adjust the playback rate between 0.25 and 4.0. The default is 1.0. This is useful for speeding up dense text or slowing down complex passages for clarity.
Language Code
Pass an ISO language code to force a specific language. If omitted, the system guesses from the script, defaulting to English for Latin text. Explicitly setting this prevents errors with non-English Latin-script languages.
- Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish.
- Set explicitly for accurate pronunciation of less common languages.
Model Selection
Choose between tts-1 (standard) and tts-1-hd (high quality). Both use the same engine and price. Select based on your production quality requirements.
tts-1: Standard quality.tts-1-hd: High definition audio.
Rate Limits
Rate limits govern how frequently your API key can process requests. This ensures stable generation performance across all users sharing the infrastructure. Limits are enforced per key, not per account.
Standard Limit
After your initial trial period or first top-up, the standard limit is 60 requests per minute. This allows steady processing for most audiobook production workflows.
Initial Limit
New keys start with a lower limit of 10 requests per minute. This applies until the first top-up is credited to your balance.
- Limit resets every 60 seconds.
- Applies to all request types.
Queue Behavior
Requests exceeding the limit receive a 429 Too Many Requests error. The message specifies the current limit (10 or 60 requests per minute). Requests are processed sequentially, so under load, you may experience delays before generation begins.

Error Handling
When synthesis fails, the API returns an error status code without charging your balance. Failed requests are free, so you can retry with corrected parameters without cost. This ensures that temporary processing issues do not impact your account balance.
Understanding common errors helps you debug quickly. The API provides clear messages for invalid inputs, allowing you to fix issues like exceeding character limits or using unsupported formats before retrying.
Common Errors
The API returns specific error messages for invalid requests. Common issues include exceeding the 4096-character limit per request, using an invalid voice ID, or passing an unsupported response format. Each error includes a descriptive message to help you correct the input.
Ensure your text fits within the character limit and that your API key is active. If you receive a rate limit error, wait briefly before retrying, as requests are processed sequentially under load.
- 400 Bad Request: Invalid input parameters or missing required fields.
- 401 Unauthorized: Invalid or expired API key.
- 429 Too Many Requests: Exceeded 60 requests per minute limit.
- 500 Server Error: Temporary processing failure, no charge applied.
Failed Request Billing
If synthesis fails due to server errors or invalid inputs, the request is not charged. The balance remains unchanged, and no characters are deducted from your account. This applies to both immediate failures and timeouts.
Retry failed requests confidently. Since failed requests are free, you can adjust parameters and retry without worrying about unnecessary costs. This is useful for handling transient network issues or temporary service disruptions.
Status Codes
The API uses standard HTTP status codes to indicate success or failure. A 200 OK response means the audio file is ready for download. Any non-2xx code indicates an error, with details provided in the response body.
Use these status codes to implement robust error handling in your application. For example, handle 429 errors by implementing exponential backoff, and retry 500 errors after a short delay.
Integration Examples
Connect your audiobook production pipeline with minimal code. These examples demonstrate how to send manuscript text and receive audio files using standard tools.
Choose the method that fits your workflow. The cURL command is ideal for quick testing, while the Python script automates batch processing for full chapters.
cURL Command
Use this command to generate speech instantly. Replace YOUR_API_KEY with your credential from the dashboard.
The response contains the binary audio data, which you can save directly to your project folder for further editing.
curl -X POST https://api.roman189.cc/v1/audio/speech-H 'Authorization: Bearer YOUR_API_KEY'-H 'Content-Type: application/json'- ` -d '{"model":"tts-1","input":"Hello world","voice":"nova","response_format":"mp3"}'`
OpenAI SDK Config
Leverage the official OpenAI SDK by pointing it to our base URL. This allows you to use familiar methods without learning a new client library.
Configure the base URL to https://api.roman189.cc/v1 and provide your API key. All parameters remain identical to the standard speech endpoint.
Python Script
This script handles the request and saves the audio file. It is suitable for processing large manuscripts where you need to loop through chapters.
Ensure you have the requests library installed. The script writes the raw audio bytes to a file.
You can adjust the voice parameter to match your narrator’s style, such as atlas for news or luna for storytelling.
Data Formats
The API accepts a strict JSON payload containing the text and configuration parameters. Audio is returned directly in the response body, eliminating the need for secondary download steps. This structure ensures straightforward integration for indie authors and audiobook producers automating their production pipelines.
Understanding the character count is critical for managing your budget and request limits. Each request is capped at 4096 characters, so longer manuscripts must be split and concatenated by the client application.
JSON Body
Send a POST request to /v1/audio/speech with a JSON body. Include model, input, voice, response_format, and optionally speed or language. The input field accepts plain text up to 4096 characters. Spaces and punctuation count toward this limit.
- Use
tts-1ortts-1-hdfor the model. - Set
response_formatto mp3, wav, opus, flac, or pcm. - Pass text as a standard UTF-8 string in the
inputfield.
Audio Response
The response body contains the raw audio binary data, matching the requested format. No metadata is included in the audio file itself. Generated audio is not stored by the server after delivery.
- Response headers include
Content-Typematching your format choice. - Audio files carry an inaudible synthetic watermark.
- No SSML or custom pronunciation tags are embedded.
Character Count
Billing is based on the total number of characters processed, including spaces and punctuation. The rate is $0.01 per 1,000 characters. Requests exceeding 4096 characters will fail; split longer texts into multiple requests to ensure successful synthesis.
- Count every character, including whitespace.
- Failed requests do not incur charges.
- Split long texts to stay within the 4096-character limit per request.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Their clear, steady delivery handles long descriptive passages effectively.
23 languages
Any voice speaks any of these languages.
