Frequently asked questions
How do I authenticate requests to the TTS API?
Include your API key in the Authorization header as a Bearer token: Authorization: Bearer tts-.... Each account holds one active key. You can issue a new key at any time via your dashboard; the previous key stops working immediately upon issuance.
Can I use the OpenAI SDK with this API?
Yes. The request shape matches the OpenAI speech endpoint. Update your SDK’s base_url to https://api.play15q.com/v1 and use your Polyglot API key. This allows you to use official OpenAI SDKs without modifying the core request logic.
What is the base URL for the API?
The API base URL is https://api.play15q.com/v1. Use POST https://api.play15q.com/v1/audio/speech for speech generation. Other endpoints like /v1/voices and /v1/models are also available at this base path for retrieving configuration details.
How many requests can I make per minute?
The rate limit is 60 requests per minute per key. New accounts start with a lower limit of 10 requests per minute until the first top-up is processed. Failed requests are free.
What happens if I exceed the rate limit?
Requests are processed sequentially. If you exceed the limit, subsequent requests will wait in a queue until capacity is available.
How do I split long texts for synthesis?
Split your text into parts of up to 4096 characters each. Send each part as a separate POST request to the /audio/speech endpoint. Then, concatenate the returned audio files to create the final audio output for the full text.
Does the API support SSML?
No. The API does not support SSML, phoneme dictionaries, or custom pronunciation lexicons. You can only control basic parameters like speed and voice selection. For precise control, you must manage text segmentation and formatting in your application logic.
What audio formats are available?
You can request audio in mp3, wav, opus, flac, or pcm formats. Specify your preference using the response_format field in the JSON request body. All generated files contain an inaudible watermark to identify them as synthetic speech.
How do I set the language for a voice?
Include the language field with an ISO code (e.g., fr, de) in your request. If omitted, the system guesses the language from the script, defaulting to English for Latin text. Explicitly setting it ensures accuracy for non-English Latin scripts.
Is the speed parameter adjustable?
Yes. The speed parameter accepts values between 0.25 and 4.0. This allows you to slow down or speed up the narration. Adjusting speed does not affect the character count or pricing.
What happens if a request fails?
If synthesis fails, the charge is returned in full. You are not billed for failed requests. The API returns an error response indicating the failure reason, allowing you to retry or adjust parameters like text length or voice selection.
Do I need to pay for failed requests?
No. Failed requests are free. If the synthesis process fails for any reason, the cost is refunded to your balance immediately. You only pay for successfully generated audio files.
How do I issue a new API key?
You can issue a new key from your account dashboard. When you generate a new key, the old one stops working immediately. This is useful for rotating keys or revoking access if a key is compromised.
What is the maximum input length?
The maximum input length is 4096 characters per request. Spaces and punctuation count toward this limit. For longer texts, split the content into chunks of 4096 characters or less and process them sequentially, then join the resulting audio files.
First request
curl
curl https://api.play15q.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.play15q.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.play15q.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 and Keys
Access the Polyglot API by including an Authorization header with your Bearer token in every request. The key format is tts-... and is issued when you create an account on the /get-api-key/ page. You may authenticate via Google or email, and the key remains active until manually rotated.
Bearer token format
Include the header Authorization: Bearer tts-<your-key> in your HTTP requests. This token authenticates your account and tracks your usage against the 60 requests per minute limit.
Issuing a new key
Generate a new key from your dashboard at any time. The interface displays your current key, balance, and usage statistics alongside a ready curl example for immediate testing.
Old key deactivation
Once a new key is issued, the previous one stops working immediately. This ensures that if a key is compromised, you can revoke access instantly without waiting for a renewal cycle.
First Request with cURL
To generate speech, send a POST request to https://api.play15q.com/v1/audio/speech with your Bearer token. The endpoint accepts JSON bodies containing the model, input text, voice preset, and desired output format.
Requests are processed one after another. For short phrases, expect a few seconds of latency; longer texts generate at roughly real-time speed (about 25 characters of text per second of generation). Ensure your key has sufficient balance before sending.
POST endpoint structure
Direct your requests to https://api.play15q.com/v1/audio/speech. Include the Authorization: Bearer tts-... header with your active API key. The request body must be formatted as JSON, containing the text to synthesize and audio configuration parameters.
JSON body parameters
Key fields include model ("tts-1" or "tts-1-hd"), input (text up to 4096 characters), voice (one of 8 presets), and response_format (mp3, wav, opus, flac, or pcm). Optional parameters allow speed adjustment (0.25–4.0) and language specification.
- model: "tts-1" or "tts-1-hd"
- input: string, max 4096 chars
- voice: preset name (e.g., "aria")
- response_format: mp3, wav, opus, flac, pcm
- speed: 0.25 to 4.0
- language: optional ISO code
Example request code
Use cURL to test the endpoint immediately. Replace YOUR_API_KEY with your actual key and text with your content. The response returns the audio file directly in the body.
curl -X POST "https://api.play15q.com/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"}'
Using the OpenAI SDK
The OpenAI Python or Node.js SDKs work directly with the Polyglot API. You simply redirect the client to our base URL: https://api.play15q.com/v1. Pass your tts-... key as the API key, just as you would for any other service. This allows you to reuse existing codebases without rewriting request logic.
Changing base_url
Configure your SDK client to point to https://api.play15q.com/v1. This single change routes all POST /v1/audio/speech requests to our infrastructure. Ensure your Authorization: Bearer header includes your unique API key.
Using official SDKs
Since our endpoint shape matches the OpenAI Speech API, you can use the official OpenAI SDKs for Python, JavaScript, or Go. Pass your text via the input field and select a model like tts-1 or tts-1-hd. The response returns the audio file directly.
Voice parameter mapping
Map the voice parameter to one of our eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Voices are based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings. Choose the tone that best fits your language-learning module.
Supported Audio Formats
The API supports five standard audio formats: MP3, WAV, Opus, FLAC, and PCM. These options allow you to balance file size and compatibility depending on your language-learning app’s playback requirements.
MP3, WAV, Opus, FLAC, PCM
MP3 and Opus provide efficient compression for smaller file sizes, ideal for mobile data usage. WAV and FLAC offer lossless quality, suitable for high-fidelity educational content. PCM delivers raw, uncompressed audio data.
Format selection in request
Specify your preferred format using the response_format field in the JSON body of your POST request. Accepted values are mp3, wav, opus, flac, and pcm.
Quality vs size tradeoffs
Choose lossy formats like MP3 or Opus to minimize storage and bandwidth costs. Select lossless formats like FLAC or WAV if preserving exact audio fidelity is critical for your learners' experience.
Rate Limits and Queuing
Efficient API usage requires understanding your rate limits, which are tied directly to your active key. Polyglot API enforces a standard limit of 60 requests per minute for accounts with sufficient balance, ensuring stable performance for language-learning applications. This limit applies per key.
60 requests per minute
Once your account is funded, you can send up to 60 synthesis requests per minute. This throughput is sufficient for most indie developer workflows, allowing you to generate vocabulary lists or short dialogues rapidly without significant delay.
10 requests before top-up
New accounts or those with an empty balance start with a reduced limit of 10 requests per minute. This constraint applies even if you have used your free trial credit. You must complete a top-up via USDT on the TRON network (TRC-20) to unlock the full 60 requests/minute capacity.
Queue handling under load
Requests are processed sequentially. Under heavy load, your request may wait in a queue before synthesis begins. While long texts generate at roughly real-time speed (25 characters per second), short phrases may take a few seconds due to queueing. Ensure your client handles HTTP timeouts gracefully.

Input Limits and Splitting
Each API call accepts a maximum of 4096 characters, including spaces and punctuation. This limit applies per request, so longer texts must be divided before sending.
Splitting allows you to process large documents efficiently. You can divide the text into chunks that fit within the character limit and send them sequentially.
4096 character limit per request
The input field input supports up to 4096 characters. Any text exceeding this length will be rejected by the API. Spaces and punctuation count toward this total.
- Maximum 4096 characters per request
Splitting long texts
To handle longer content, split the text into smaller parts. Each part must be under 4096 characters. Send each part as a separate request.
Ensure your splitting logic preserves natural pauses between sentences to maintain audio coherence.
- Split by sentences or paragraphs
Joining audio files
After receiving the audio files for each chunk, join them into a single file. This creates a continuous playback experience for the user.
Use standard audio libraries to concatenate the MP3, WAV, or other format files. The API returns the audio directly in the response.
Error Handling and Responses
The API uses standard HTTP status codes to indicate success or failure. A 200 OK response means the audio file is ready. Use 4xx codes for client errors, such as invalid keys or malformed requests, and 5xx codes for server-side issues during synthesis.
Standard HTTP error codes
The API returns standard HTTP status codes to indicate the outcome of your request. Use 4xx codes for client errors, such as invalid keys or malformed requests, and 5xx codes for server-side issues during synthesis.
Failed request refund
If synthesis fails, the charge is returned in full. This applies to any request that does not successfully produce an audio file, ensuring you only pay for completed generations.
Response structure
Successful responses include the audio binary data directly in the body. For errors, the response body contains a JSON object with an error message and code to help you debug the issue quickly.
Voice and Language Parameters
Select from eight distinct voice presets to match your app’s tone. Female voices include Aria, Nova, Luna, and Sage, while male options offer Felix, Milo, Atlas, and Orion. Each voice is engineered for specific contexts, from warm narration to neutral news delivery, ensuring the synthetic speech fits your educational content naturally.
Selecting a voice preset
Pass the desired voice name directly in the voice parameter of your request. The engine supports eight presets, including warm narrators like Aria and calm instructional voices like Sage. All voices can speak any of the 23 supported languages, allowing you to maintain a consistent character across different linguistic modules in your language-learning app.
- 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
Setting language code
Use the optional language field to specify an ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script content, explicitly setting the language code ensures accurate pronunciation. The engine supports 23 languages, including Arabic, Chinese, French, German, Japanese, and Spanish.
Speed adjustment range
Adjust the speed parameter between 0.25 and 4.0 to control playback rate. This allows you to slow down speech for learners or speed it up for advanced users. The engine maintains natural intonation within this range, ensuring the synthetic speech remains clear and understandable for educational purposes.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Language learning empowers indie developers to connect deeply with global audiences without heavy marketing budgets.
23 languages
Any voice speaks any of these languages.
