Frequently asked questions
How do I authenticate with the API?
Include an Authorization: Bearer tts-... header with your unique API key in every request. Each account holds one active key. You can issue a new key at any time, which immediately invalidates the previous one, ensuring secure access to the TTS endpoint.
What is the maximum text length?
Each request supports up to 4096 characters of input text. For longer content, split the text into chunks of this size and join the resulting audio files. Spaces and punctuation count toward this character limit per request.
Can I use the OpenAI Python SDK?
Yes. The API uses the same request shape as the OpenAI speech endpoint. Update your SDK's base_url to https://api.dopaminas.info/v1 and use your LumeVoice key. The official OpenAI SDKs work directly without modification.
How do I set the Japanese language?
Pass the ISO code ja in the language field of your JSON request body. Although the API guesses language from the script, explicitly setting the language ensures correct synthesis for Japanese text, especially when mixed with Latin scripts.
What is the default model?
The API accepts tts-1 or tts-1-hd as model values. Both use the same engine and price. There is no strict default enforced by the server; you must specify the model in your request body.
Does the API support streaming?
No. The API returns the complete audio file in the response body. There is no WebSocket or real-time partial audio support. You receive the full synthesized audio once processing is complete.
How do I handle rate limits?
Limits are 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so under load, your request may wait in a queue. Implement exponential backoff if you encounter throttling.
What happens on a 400 error?
If synthesis fails, the charge is returned in full. Failed requests do not deduct from your balance. Check your request body for invalid parameters, such as incorrect voice names or unsupported character counts.
Can I change the base URL?
Yes. For OpenAI SDKs, change the base_url configuration to https://api.dopaminas.info/v1. This allows you to use standard client libraries while routing requests to the LumeVoice infrastructure.
Is SSML supported?
No. The API does not support SSML, phoneme dictionaries, or custom pronunciation lexicons. You can control speed using the speed parameter (0.25–4.0) and select from eight voice presets, but no markup is processed.
How do I detect the language?
If the language field is omitted, the API guesses the language from the script. Latin text defaults to English. For non-English Latin text or to ensure accuracy, explicitly set the language parameter to the ISO code.
What is the response format?
The API returns the audio file directly in the response body. You can specify the format using the response_format field, choosing from mp3, wav, opus, flac, or pcm. Each generated file includes an inaudible watermark that marks it as synthetic speech.
Can I generate audio in PCM?
Yes. Set the response_format field to pcm in your request JSON. This outputs raw pulse-code modulation audio data. Other supported formats include mp3, wav, opus, and flac.
How do I rotate my API key?
Issue a new key via your account dashboard. The new key becomes active immediately, and the old key stops working at once. You can rotate keys as needed without downtime or additional fees.
First request
curl
curl https://api.dopaminas.info/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.dopaminas.info/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.dopaminas.info/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 relies on a single active Bearer token passed in the Authorization header. This key grants access to the TTS infrastructure and is tied to your account balance.
Bearer Token
Include your key as Authorization: Bearer tts-... in every request header. The token authenticates your identity and links usage to your specific account for billing purposes.
Key Management
Each account maintains one active key. You can view your current key and usage statistics on the /get-api-key/ dashboard page.
Key Rotation
Issue a new key at any time via the dashboard. The previous key becomes invalid immediately, ensuring secure access control without downtime.
Endpoint Specification
The core synthesis endpoint is POST https://api.dopaminas.info/v1/audio/speech. It accepts a JSON body and returns generated audio, supporting standard OpenAI SDK workflows via base URL adjustment.
POST /v1/audio/speech
Send your text payload to this endpoint. The API processes the request synchronously, returning the audio file directly in the response body for short texts; long texts are split into parts and joined. This allows straightforward integration into e-learning content pipelines without complex streaming logic, as no streaming is supported.
JSON Body Structure
The request body requires the model ("tts-1" or "tts-1-hd"), input (text up to 4096 characters), voice (e.g., "nova" for Japanese), and response_format. Optional fields include speed (0.25–4.0) and language ("ja").
- model: "tts-1" or "tts-1-hd"
- input: string, max 4096 characters
- voice: one of 8 presets
- response_format: mp3, wav, opus, flac, or pcm
Response Format
The API returns the audio file directly in the response body. The Content-Type header matches the requested format. Failed requests return an error JSON object with a status code and description.
Parameters
Configure your TTS requests using three core parameters: model, input text, and voice. These fields determine audio quality, character capacity, and vocal style for each synthesis job.
Select a model for processing tier, ensure text stays within the character limit, and choose one of eight preset voices. All voices support Japanese and other 23 languages, but the language parameter should be set explicitly for non-English Latin text to ensure correct pronunciation.
Model Selection
Choose between tts-1 or tts-1-hd. Both use the same engine and pricing tier, allowing consistent behavior across your e-learning audio pipeline without feature variation.
The model field determines the synthesis engine but does not affect the voice preset or language capabilities.
Input Text Limit
The input field accepts plain text up to 4096 characters per request. Spaces and punctuation count toward this limit.
For longer course content, split the text into parts under this limit and join the resulting audio files in your playback logic.
Voice Presets
Select one of eight voices (e.g., aria, nova, luna, sage, felix, milo, atlas, orion). Each voice can speak Japanese and all other supported languages.
Set the language parameter to ja for Japanese text to ensure correct pronunciation, as the API guesses language from script by default.
- 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
Audio Formats
Selecting the correct audio format ensures compatibility with your LMS player. We support five standard formats to balance quality and bandwidth for your e-learning content.
MP3 Support
MP3 is the default and most widely supported format. It provides a good balance between file size and audio quality for web delivery.
WAV Support
WAV offers uncompressed, high-fidelity audio. Use this format if your course builder requires lossless audio for professional voiceovers.
Opus and FLAC
Opus provides efficient compression for smaller file sizes, ideal for mobile learners. FLAC offers lossless compression without quality loss, suitable for archival.
Curl Example
Use curl to test the TTS endpoint directly. Send a POST request with your Bearer token and desired parameters to receive the audio file.
Basic Request
Send a standard request to generate audio. The API returns the file in the specified format.
- curl -X POST https://api.dopaminas.info/v1/audio/speech \ -H "Authorization: Bearer tts-your-key" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova", "response_format": "mp3"}'
Japanese Language Code
Explicitly set the language parameter for Japanese text to ensure correct pronunciation. Without it, the system may guess incorrectly.
- curl -X POST https://api.dopaminas.info/v1/audio/speech \ -H "Authorization: Bearer tts-your-key" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "こんにちは世界", "voice": "nova", "response_format": "mp3", "language": "ja"}'
Speed Adjustment
Adjust playback speed between 0.25 and 4.0. Use this to match the pacing of your e-learning modules.
- curl -X POST https://api.dopaminas.info/v1/audio/speech \ -H "Authorization: Bearer tts-your-key" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Test", "voice": "nova", "response_format": "mp3", "speed": 1.5}'

OpenAI SDK Setup
LumeVoice implements an endpoint shape compatible with the OpenAI speech API, allowing developers to leverage existing SDK integrations with minimal configuration changes. By adjusting the base URL, teams can maintain their current code structure while utilizing our high-volume TTS infrastructure.
This compatibility reduces integration overhead for e-learning platforms that already utilize OpenAI SDKs for other services, ensuring a seamless transition to LumeVoice for audio generation needs.
Base URL Change
Update the SDK configuration to point to https://api.dopaminas.info/v1. This single change redirects all speech requests to LumeVoice’s infrastructure while preserving the standard request schema.
Ensure the base_url parameter is set correctly in your client initialization to avoid routing errors during the generation process.
Client Initialization
Initialize the OpenAI client using your LumeVoice API key. The authentication header remains Authorization: Bearer tts-..., identical to standard OpenAI implementations.
```python import openai client = openai.OpenAI(base_url="https://api.dopaminas.info/v1", api_key="YOUR_API_KEY") ```
SDK Compatibility
The official OpenAI SDKs work directly with LumeVoice because we mirror the request shape. You can use standard parameters like model, input, and voice without modification.
Note that LumeVoice does not offer a proprietary SDK. Developers should rely on the official OpenAI libraries or plain HTTP requests for integration.
Rate Limits
Each API key allows 60 requests per minute, ensuring predictable throughput for batch audio generation. This limit applies uniformly across all endpoints and models, providing a stable foundation for automated course production pipelines without sudden throttling during peak usage hours.
60 Requests Per Minute
The standard rate limit is 60 requests per minute per key. This capacity supports moderate-volume e-learning content creation, though requests are processed sequentially and may queue under load.
Initial Limit
New accounts start with a lower limit of 10 requests per minute. This restriction applies until the first top-up is processed. Once a minimum $5 USDT transfer is confirmed on the TRON network, the limit increases to the standard 60 requests per minute.
Queue Processing
Requests are processed sequentially. Under load, additional requests may wait in a queue before synthesis begins. Long texts are split into parts of up to 4,096 characters, which are then joined, meaning multiple API calls are required for full-length courses. Monitor your dashboard to track queue depth and ensure timely delivery of audio assets.
Error Handling
The API returns standard HTTP status codes to indicate the result of your synthesis request. Understanding these responses helps you implement robust retry logic and manage your e-learning audio generation workflows efficiently.
400 Bad Request
This error occurs when the request body is malformed or contains invalid parameters. Common causes include exceeding the 4096 character limit for the input field or providing an unsupported voice name.
401 Unauthorized
The API key provided in the Authorization header is invalid, expired, or missing. Ensure you are using the correct key from your dashboard and that it has not been rotated.
429 Too Many Requests
You have exceeded the rate limit of 60 requests per minute. Requests are processed sequentially, so under load, additional requests may queue. Wait before retrying to avoid further delays.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Its clear enunciation supports rapid back-and-forth exchanges typical in language learning apps or gamified course segments.
23 languages
Any voice speaks any of these languages.
