Frequently asked questions
How do I set the base_url for the OpenAI SDK?
Set the base_url to https://api.jjj2.info/v1. This allows you to use the official OpenAI SDKs by changing the base_url. Send your API key via the Authorization header as Bearer tts-... The request shape matches the OpenAI speech endpoint, ensuring compatibility with existing client implementations without requiring custom code.
What is the maximum text length per request?
The maximum input length is 4096 characters per request. If your text exceeds this limit, you must split it into smaller parts. Process each part separately and then join the resulting audio files. This ensures consistent synthesis performance and adheres to the API's processing constraints for each individual call.
Can I use the same key for multiple projects?
Yes, each account has one active API key that can be used across multiple projects. If you need to revoke access, you can issue a new key at any time. The old key stops working immediately when the new one is issued, allowing you to manage access across different environments easily.
How do I specify the language in the request?
Include the optional 'language' field with an ISO code in your JSON body. If omitted, the system guesses the language based on the script, defaulting to English for Latin text. For non-English Latin-script text, you must explicitly set the language field to ensure correct synthesis and avoid mispronunciation.
What is the difference between tts-1 and tts-1-hd?
Both models use the same engine and have the same price. The only difference is the model identifier string you send in the request body. You can choose either 'tts-1' or 'tts-1-hd' without any change in cost or performance characteristics, as they are functionally identical for your billing and usage.
Does the API support SSML tags?
No, the API does not support SSML tags. It accepts plain text input up to 4096 characters. You cannot use SSML for pronunciation or pacing control. You can adjust the speed parameter within the supported range of 0.25 to 4.0.
How do I handle rate limit errors?
The limit is 60 requests per minute per key, or 10 per minute before your first top-up. If you exceed this, requests may queue or fail. Implement exponential backoff in your client code. Since requests are processed sequentially under load, adding a small delay between requests helps avoid hitting the rate limit threshold.
Can I stream the audio response?
No, the API does not support streaming or WebSocket connections. You receive the complete audio file in the response body after synthesis finishes. For long texts, you must split the input, generate each part, and join the resulting files locally. This approach ensures you get the full audio data without partial chunks.
What happens if the API is down?
There is no SLA or uptime guarantee. If the API is unavailable, your requests will fail. Failed requests are free, and any charge is returned in full. You can retry your requests once the service is restored. Monitor the status code in your response to determine if a retry is necessary.
Is the API key secure if stored in frontend?
The API key is a single active credential for your account. If stored in frontend code, it is exposed to users. Anyone with the key can use your balance. For production, use a backend proxy to hide the key. Rotate keys if compromise is suspected.
How do I split long texts into parts?
Split your text into chunks of up to 4096 characters. Send each chunk as a separate POST request to the speech endpoint. Collect the audio files returned in each response. Finally, join these audio files into a single file. This method ensures that each request stays within the character limit for synthesis.
Can I use the API for commercial projects?
Yes, you can use the generated audio for commercial projects. You pay based on characters processed, with no minimum spend or monthly plans. The generated files include an inaudible watermark marking them as synthetic speech, which is standard for this service.
Do I need an account to test the API?
Yes, you need an account to obtain an API key. Sign up via Google or email on the /get-api-key/ page. Google sign-ups receive a $0.50 free trial valid for 7 days. Email accounts start without trial credit. You must have a key to authenticate requests to the API endpoint.
How do I get the list of available voices?
Send a GET request to /v1/voices. This endpoint returns the available voices, languages, formats, and pricing information. You can use this data to select from the eight presets like aria, nova, or felix. The response helps you configure your client with the correct voice ID and supported parameters for synthesis.
First request
curl
curl https://api.jjj2.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.jjj2.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.jjj2.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
The API authenticates every request using a Bearer token provided in the Authorization header. You obtain this key from your account dashboard at /get-api-key/. Each key is unique to your account and carries your usage quota and billing status.
Bearer token in Authorization header
Include the header Authorization: Bearer tts-<your-key> in every POST request to the speech endpoint. The API validates this token against the active key registered to your account before processing synthesis.
One active key per account
Your account maintains a single active API key at any time. This simplifies access control for your team, ensuring that all synthesis requests are billed to one unified balance without managing multiple credential sets.
Key rotation on demand
If your key is compromised or you need a fresh credential, you can issue a new key from the dashboard at any time. The previous key is invalidated immediately upon rotation, securing your accessibility workflows without delay.
Endpoint: Speech
The POST /v1/audio/speech endpoint accepts your text payload and returns synthesized audio. It is the primary interface for generating speech files for your accessibility workflows.
POST /v1/audio/speech
Send a POST request to https://api.jjj2.info/v1/audio/speech. The endpoint processes text up to 4096 characters per call, returning the audio file directly in the response body.
- Base URL: https://api.jjj2.info/v1
- Method: POST
- Format: JSON request, binary audio response
JSON body required
Include model, input, and voice in the JSON body. Optional fields include response_format, speed, and language. The input text is limited to 4096 characters; longer texts must be split and joined by the client.
- Required fields:
model,input,voice - Max
inputlength: 4096 characters - Optional:
response_format,speed(0.25–4.0),language
Returns audio file directly
The response contains the audio file binary. Supported formats include mp3, wav, opus, flac, and pcm. No streaming or partial audio chunks are returned; the entire file is delivered upon completion.
- Formats: mp3, wav, opus, flac, pcm
- No streaming or WebSocket support
- Binary audio data in response body
Request Parameters
Configure the synthesis engine by selecting tts-1 or tts-1-hd. Both models use the same underlying engine and incur identical pricing, so your choice depends solely on the required audio fidelity for your accessibility workflows.
Model: tts-1 or tts-1-hd
Select tts-1 for standard generation or tts-1-hd for higher quality. Both utilize the same engine and price point, allowing you to switch without changing your billing structure.
Input: text up to 4096 chars
Pass your text in the input field, with a hard limit of 4096 characters per request. Spaces and punctuation count toward this total. For longer content, split the text into chunks and join the resulting audio files.
- Maximum length: 4096 characters
- Includes spaces and punctuation
- Split manually for longer texts
Voice: one of 8 presets
Choose from eight licensed presets, such as aria for clear narration or atlas for neutral news delivery. Any voice can speak any of the 23 supported languages, so set the language parameter explicitly for non-English Latin-script text to ensure accurate pronunciation.
- 8 presets available
- Supports all 23 languages
- Set
languagefor non-English Latin text
Response Formats
Specify the response_format field in your request to control the output container. Supported formats include mp3, wav, opus, flac, and pcm. This allows integration teams to select the codec that best fits their accessibility pipeline or storage constraints without additional conversion steps.
mp3, wav, opus, flac, pcm
The API returns raw audio data in the requested format. MP3 and OPUS provide efficient compression for network transmission, while WAV and FLAC offer lossless quality for archival or high-fidelity playback.
- mp3: Compressed, widely compatible
- wav: Uncompressed, standard for processing
- opus: Efficient low-latency compression
- flac: Lossless compression
- pcm: Raw linear audio
Binary audio in response
The response body contains the binary audio file directly, not a JSON wrapper. Ensure your HTTP client handles binary data correctly. For long texts split into segments, each response returns a separate audio file that must be concatenated by your application logic.
No streaming or partial audio
Synthesis is not streamed. The entire audio file is generated before the response is sent. Partial audio chunks are not available, so you cannot play audio while it is still being synthesized. This ensures consistent audio quality but increases perceived latency for short phrases.
OpenAI SDK Integration
Integrate our TTS API into existing workflows by adjusting the base URL in your preferred OpenAI SDK. This allows teams to maintain their current code structure while leveraging our synthesis engine for accessibility and dyslexia support tasks.
Change base_url to api endpoint
Point your SDK client to https://api.jjj2.info/v1. This single configuration change redirects all synthesis requests to our infrastructure without requiring new client libraries or dependency updates.
Use official OpenAI SDKs
Leverage the standard OpenAI Python or Node.js SDKs. The official clients handle authentication and serialization automatically, reducing boilerplate code for your engineering team.
Same request shape
The JSON payload structure matches the OpenAI speech endpoint exactly. Pass your tts-... API key in the Authorization header and send standard parameters like model and voice.
- No custom wrappers needed
- Immediate compatibility with existing TTS logic

Curl Example
Use curl to verify your key and generate audio directly from the terminal. This method confirms that your authentication is correct before integrating with your accessibility or dyslexia support workflows.
POST request with JSON
Send a POST request to https://api.jjj2.info/v1/audio/speech with a JSON body containing your text and voice selection. The input field accepts up to 4096 characters; split longer texts into parts and join the resulting audio files.
- Endpoint:
POST https://api.jjj2.info/v1/audio/speech - Body:
{"model": "tts-1", "input": "Hello world", "voice": "nova"}
Authorization header set
Include your API key in the Authorization header as a Bearer token. Ensure your key is active, as only one key is valid per account at any time.
Response saved to file
Redirect the binary audio output to a local file. The response contains the audio directly, with no streaming or partial chunks.
Rate Limits
Your API key is limited to 60 requests per minute. This limit applies to the speech endpoint. Exceeding this threshold returns a 429 status code until the window resets.
60 requests per minute
The standard rate limit allows 60 requests per minute per key. This capacity supports steady batch processing for accessibility workflows. Each request counts toward this total.
10 requests before first top-up
New accounts without a USDT top-up are restricted to 10 requests per minute. This lower limit ensures fair usage during the trial phase. Once a minimum $5 top-up is processed, the limit increases to 60 requests per minute.
Queued processing under load
Requests are processed sequentially within the rate limit window. Under heavy load, synthesis may wait in a queue before beginning. Typical processing speed is roughly real-time, but short phrases may take a few seconds. Ensure your integration handles 429 errors with exponential backoff to manage queue delays efficiently.
Error Handling
The API returns standard HTTP status codes to indicate success or failure. A 200 OK response confirms successful synthesis, while 4xx errors indicate client-side issues like invalid parameters or insufficient balance.
All errors include a JSON body with an error object containing a code and message field for programmatic handling.
HTTP status codes
Use 200 for success, 400 for bad requests, 401 for authentication failures, and 429 for rate limit exceeded. The 429 response includes a Retry-After header.
JSON error response
Errors follow a consistent JSON structure. The response body contains an error object with a code string (e.g., invalid_request_error) and a human-readable message.
- Check the
codefield for precise error identification. - Parse the
messagefor debugging details.
Failed requests are free
If synthesis fails due to a server-side issue or invalid input, no charge is applied. The character count remains unchanged on your balance.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Uniform voice characteristics across requests ensure a predictable listening experience.
23 languages
Any voice speaks any of these languages.
