Frequently asked questions
Does the API support SSML for formatting?
No, the API does not support SSML. It accepts plain text input up to 4096 characters. You cannot use SSML tags for formatting, pauses, or emphasis within the input string. The API focuses on simple text-to-speech conversion without complex markup support.
Can I stream audio while it is generating?
No, the API does not support streaming or WebSocket connections. You send a POST request and receive the complete audio file in the response body. Audio is not streamed in real-time; you must wait for the full synthesis to complete before receiving the file.
How do I handle character limits for long texts?
Split your text into parts of up to 4096 characters. Send each part as a separate request to the /v1/audio/speech endpoint. Then, join the resulting audio files together in your application. This ensures each request stays within the single-request character limit.
Is the OpenAI SDK compatible with this API?
Yes, the official OpenAI SDKs work by changing the base_url to https://api.playa08.com/v1. Use the same request shape as the OpenAI speech endpoint. Authenticate with your Bearer token. This allows you to use existing OpenAI client libraries with minimal configuration changes.
What happens if I exceed the rate limit?
You are limited to 60 requests per minute per key. If you exceed this, requests may be queued or rejected. New accounts start with 10 requests per minute. Ensure your integration handles rate limit errors gracefully by implementing retry logic with exponential backoff.
Can I mix voices in a single audio file?
No, each request generates audio using a single voice preset. You cannot mix multiple voices in one file. To create a multi-voice track, generate separate audio files for each voice segment and combine them using your own audio editing or processing tools.
How do I specify a language for Latin script text?
Set the optional 'language' field in your request body to the ISO code. If omitted, the API guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly setting the language ensures accurate pronunciation and prevents incorrect language detection.
Are there any Python or JS SDKs provided?
No, we do not provide official SDKs. You can use the OpenAI SDKs or plain HTTP requests. The API follows the same request shape as OpenAI, making it easy to integrate with existing libraries. No proprietary mobile or web SDKs are available.
How do I revoke an old API key?
Issue a new API key from your account dashboard. The new key becomes active immediately, and the old key stops working at once. You can generate a new key anytime. There is no need to manually revoke; simply creating a new one invalidates the previous one.
What is the maximum text length per request?
The maximum input length is 4096 characters per request. This includes spaces and punctuation. If your text exceeds this limit, you must split it into smaller chunks. Each chunk is processed independently, and the resulting audio files are then joined together.
Does the API support custom pronunciation?
No, the API does not support phoneme dictionaries or custom pronunciation lexicons. Pronunciation is determined by the voice model and input text. You cannot upload custom pronunciation rules or specify exact phonetic sequences for specific words or names within the text.
How do I test the API with a free trial key?
Sign in with Google on the /get-api-key/ page to receive $0.50 of credit. This covers about 50,000 characters and is valid for 7 days. Use this key to make requests via the /v1/audio/speech endpoint and verify integration before purchasing more credits.
What is the default voice if none is specified?
The API accepts an optional 'voice' parameter. If omitted, a default voice is used. You can specify one of the eight presets (e.g., aria, nova, luna, sage, felix, milo, atlas, orion).
Are the audio files downloadable or streamed?
Audio files are returned directly in the HTTP response body. They are not streamed. You receive the complete file (mp3, wav, opus, flac, or pcm) after synthesis completes. You can then save or play the file in your application as needed.
First request
curl
curl https://api.playa08.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.playa08.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.playa08.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 API by generating a key on the /get-api-key/ page using Google or email. Each account holds one active key, which appears alongside your balance and usage statistics.
Include the key in the Authorization header as a Bearer token: Bearer tts-.... The format begins with tts- followed by unique characters. This token authenticates all requests to the speech endpoint.
Generate API key via /get-api-key/ page
Navigate to the /get-api-key/ dashboard to create your account via Google or email. The page displays your active key, current balance, and a ready-to-use cURL example. Keys are specific to this site domain.
Bearer token format: Bearer tts-...
Pass the key using the standard HTTP Authorization header. The value must start with Bearer followed by a space and your specific key string (e.g., Bearer tts-abc123...). This format ensures compatibility with standard HTTP clients and the OpenAI SDK.
Revoke and replace keys instantly
You can issue a new key at any time from the dashboard. The previous key stops working immediately upon generation of the new one. This allows instant revocation if a key is exposed, without waiting for a daily reset.
Endpoint Overview
The API provides three primary endpoints to manage text-to-speech synthesis. The core generation endpoint accepts text and configuration parameters to return audio files. Supporting endpoints allow developers to list available voices and verify model specifications without consuming credits.
POST /v1/audio/speech for generation
This endpoint processes your input text and returns the synthesized audio file. It accepts a JSON body containing the model, input text, voice selection, and optional parameters like speed or language. The response contains the audio data directly, supporting formats such as MP3, WAV, Opus, FLAC, and PCM.
GET /v1/voices for voice and language list
Use this endpoint to retrieve the full list of available voices and supported languages. It confirms the eight preset voices (Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion) and the 23 supported languages. This helps you configure your LMS to offer appropriate voice options for diverse employee groups.
- Returns voice IDs, names, and gender classifications
- Lists all 23 supported languages
- Shows available audio formats
GET /v1/models for model details
This endpoint provides metadata about the available TTS models. It confirms the two engine options, tts-1 and tts-1-hd, which share the same price and capabilities. Use this to verify model availability and ensure your integration requests the correct model identifiers.
Request Parameters
The API accepts standard TTS parameters to generate audio from text. Each request is limited to 4096 characters, including spaces and punctuation. For longer e-learning modules, split the text into chunks and join the resulting audio files.
Rate limits apply at 60 requests per minute per key. Failed requests incur no charge, ensuring cost accuracy for bulk training content generation.
Model: tts-1 or tts-1-hd
Both models use the same engine and pricing. Select 'tts-1' for standard quality or 'tts-1-hd' for higher fidelity. The choice affects audio clarity but not the character cost of $0.01 per 1,000 characters.
Input: text up to 4096 characters
Pass the training material text in the input field. The API processes one request at a time, so under load, requests may queue. Long texts should be pre-split to manage processing time effectively.
- Maximum length: 4096 characters per request
- Spatial punctuation counts as a character
- Failed synthesis returns full credit
Voice: 8 presets (Aria, Nova, Luna, etc.)
Choose from eight licensed voices based on LibriTTS-R and LibriVox recordings. Each voice suits different training contexts, from upbeat onboarding to calm instructional modules. All voices support all 23 available languages.
- Aria: Warm, clear narrator
- Nova: Bright, upbeat
- Luna: Soft, storytelling
- Sage: Calm, instructional
- Felix: Energetic, promo
- Milo: Friendly, conversational
Response Formats
The API supports five standard audio formats: MP3, WAV, Opus, FLAC, and PCM. You select the desired output via the response_format parameter in your request body. This flexibility allows LMS developers to choose formats that best balance file size and quality for different e-learning delivery contexts, from web-based players to downloadable course materials.
MP3, WAV, Opus, FLAC, PCM support
MP3 is recommended for most web-based LMS integrations due to its small file size and universal compatibility. WAV and FLAC offer lossless quality for archival or high-fidelity training modules. Opus provides efficient compression, while PCM offers uncompressed raw audio data.
Audio file returned in response body
The generated audio file is returned directly in the HTTP response body. There is no need to poll for a separate download link. The response includes appropriate content-type headers matching your selected format, allowing immediate integration into your training application's audio player.
No streaming or WebSocket support
Unlike some real-time solutions, this API does not support streaming audio chunks or WebSocket connections. You receive the complete audio file after synthesis finishes. For long texts, you must split the input into chunks of 4096 characters and join the resulting files client-side.
OpenAI SDK Integration
Leverage the official OpenAI SDKs for seamless integration by updating the base URL to https://api.playa08.com/v1. This allows your existing code to communicate directly with our TTS endpoint using the standard OpenAI SDK or plain HTTP.
Change base_url to api.playa08.com/v1
Configure your SDK client to point to https://api.playa08.com/v1. This single change redirects all speech synthesis requests to our infrastructure while maintaining the standard protocol structure.
Use official OpenAI SDKs with new key
Generate a tts-... key via /get-api-key/ and pass it as the standard bearer token. The SDK handles authentication automatically, ensuring secure access to the speech synthesis engine.
- One active key per account
- Instant revocation on replacement
Standard request shape compatibility
The request body matches the OpenAI speech endpoint exactly. Use model, input, voice, and response_format fields as documented. This ensures predictable behavior for LMS developers familiar with standard TTS APIs.

Rate Limits and Errors
Rate limits are enforced at 60 requests per minute per API key. This limit applies uniformly to all generated requests. Accounts created with email and password start without trial credit, while Google sign-ins receive a free trial of $0.50. New keys begin with a lower limit of 10 requests per minute until the first top-up is processed.
Requests are processed sequentially. Under high load, a request may wait in a queue before synthesis begins. This sequential processing ensures consistent audio quality but can increase latency during peak usage periods. Ensure your integration handles these delays gracefully to maintain a smooth user experience for learners.
60 requests per minute per key
Each API key is limited to 60 requests per minute. If you need higher throughput, consider generating multiple keys or distributing requests across different keys. Failed requests are free and do not consume your character balance.
- Limit: 60 requests/minute/key
- Initial limit for new email accounts: 10 requests/minute
- Retry after top-up to restore full quota
Queueing under high load
Requests are processed one after another. If many requests are submitted simultaneously, they will be queued. The queue length depends on the current server load. Typical speed is roughly real time (about 25 characters per second), so long texts may take several seconds to generate. Plan your batch jobs accordingly to avoid excessive wait times.
Handle 429 Too Many Requests errors
When you exceed the rate limit, the API returns a 429 status code. Implement exponential backoff in your client to handle these errors effectively. Retry the request after a short delay. Do not spam the API with immediate retries. Monitor your usage to stay within the 60 requests per minute limit for optimal performance.
Language Handling
By default, the API detects the language from the text script. Latin script defaults to English, so you must explicitly set the language parameter for other Latin-script languages to ensure correct pronunciation.
Explicit ISO language code parameter
Include the language field in your request body with a valid ISO code. This overrides automatic detection and ensures consistent output for mixed-language content or ambiguous scripts.
Support for 23 specific languages
The API supports Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Any voice can speak any of these languages. Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, and Bengali are not supported.
- Arabic
- Chinese
- Danish
- Dutch
- English
- Finnish
Example Curl Command
Use this curl command to generate audio directly from the command line. Replace YOUR_API_KEY with your token from the dashboard and provide the text you wish to convert.
Basic POST request with API key
Send a POST request to the speech endpoint with your bearer token in the Authorization header. This authenticates your request and associates the usage with your account for billing.
JSON body with model, input, and voice
Include the model (tts-1 or tts-1-hd), the input text (up to 4096 characters), and the desired voice preset. You can also specify the response format and speed.
- model: tts-1
- input: "Welcome to the onboarding module."
- voice: nova
- response_format: mp3
Receiving binary audio response
The response returns the audio file directly in the body. Save this output to a file using the -o flag for immediate use in your LMS player.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. The eight voice presets cover a range of professional tones suitable for corporate environments.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- Python documentation
- curl documentation
- ISO 639 language codes
- FFmpeg documentation
- IETF RFC 7845: Ogg Opus
- Node.js documentation
- W3C WAI: making audio and video accessible
- Creative Commons Attribution 4.0
- openai-python on GitHub
- LibriTTS-R paper (arXiv 2305.18802)
- OpenAI API reference: create speech
