Frequently asked questions
What is the base URL for the API?
The base URL is https://api.play45x.com/v1. You send POST requests to https://api.play45x.com/v1/audio/speech. This endpoint accepts JSON bodies identical to the OpenAI speech endpoint, allowing you to integrate the API directly into your existing workflows without learning a new structure.
Do I need to use the OpenAI SDK?
No, you do not need the OpenAI SDK. You can use plain HTTP requests or any HTTP library. The API uses the same request shape as OpenAI, so you can use the official OpenAI SDK by simply changing the base_url to https://api.play45x.com/v1.
How do I specify the voice in the request?
Include the voice name in the JSON body. Choose from eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. You can also optionally set the language using an ISO code to ensure correct pronunciation, especially for non-English Latin-script text.
What is the maximum text length?
The input text is limited to 4096 characters per request. For longer texts, split your content into parts of up to 4096 characters each. Generate audio for each part separately and join the resulting audio files to create the final course audio.
Can I change the speed of the audio?
Yes, you can adjust the speed between 0.25 and 4.0 using the speed parameter in your request. This allows you to control the pacing of your course narration to suit different learning styles or content density without needing external audio editing tools.
How do I handle special characters in text?
Send your text as standard JSON strings. Spaces and punctuation count as characters toward the 4096 limit. The API processes standard text inputs directly, so you do not need special handling for common symbols, as long as they fit within the character limit.
Is the API key case sensitive?
Yes, your API key is case sensitive. You must include it in the Authorization header as Bearer tts-... exactly as provided. Ensure you copy the key precisely from your dashboard to avoid authentication errors when making requests to the API endpoint.
What happens if I exceed the rate limit?
You are limited to 60 requests per minute per key. If you exceed this, requests may queue or fail. New accounts start with a 10 requests per minute limit. Failed requests are free, but successful ones consume your balance and count toward the limit.
Do I need to handle streaming audio?
No, there is no streaming or WebSocket support. The API returns the complete audio file in the response. You receive the final file once synthesis is complete, so you handle standard HTTP responses rather than managing real-time audio streams or partial data.
How do I debug a failed request?
Check the response status code and message. Failed requests are free, so you are not charged for errors. Ensure your text is under 4096 characters, your key is valid, and your JSON body matches the required structure. Support is available via email.
Can I use the same key on multiple sites?
Yes, you can use the same API key across multiple applications. Each account has one active key; you can issue a new key at any time, which immediately invalidates the old one. This allows easy rotation or multi-site usage.
Is there a sandbox environment?
There is no separate sandbox environment. You use the same production API endpoint for testing. You can test with your free trial credit or top-up balance. All requests go through the same infrastructure, so test results reflect production behavior accurately.
How do I test with the free credit?
Sign in with Google to receive $0.50 of free trial credit, valid for 7 days. This provides about 50,000 characters. Make a POST request to the speech endpoint with your key. The credit deducts automatically, and you can view usage in your dashboard.
What is the difference between tts-1 and tts-1-hd?
Both models use the same engine and price. The model field accepts either tts-1 or tts-1-hd. There is no functional difference in output quality or cost between the two options. You can use either model name in your requests interchangeably.
First request
curl
curl https://api.play45x.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.play45x.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.play45x.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 |
Getting Your API Key
Access the API key by visiting the /get-api-key/ page on play45x.com. You can sign up using your Google account or create a standard email and password account directly on the dashboard.
Sign up on the dashboard
Registration creates your account on this specific site. If you use Google, you receive a $0.50 trial credit valid for 7 days. Email sign-ups start without trial credit.
Copy your secret key
The dashboard displays your secret key alongside your current balance and usage stats. Copy this key to use in your Authorization header. Note that each account holds only one active key at a time.
Keep it secure
Store your key in your environment variables or secret manager. You can issue a new key at any time via the dashboard, which instantly invalidates the old one.
- One active key per account
- New keys invalidate old ones immediately
First Request with cURL
To generate speech, send a POST request to https://api.play45x.com/v1/audio/speech. The body must be valid JSON containing the text and voice selection. This endpoint accepts up to 4096 characters per request.
Basic JSON body structure
The request body includes model, input, voice, and response_format. The input field holds your text string. The voice field selects one of the eight available presets.
- model: "tts-1" or "tts-1-hd"
- input: your text content
- voice: voice identifier string
- response_format: mp3, wav, opus, flac, or pcm
Required parameters explained
You must provide a valid model and voice. The input text is capped at 4096 characters. Spaces and punctuation count toward this limit. A language code is optional but recommended for non-English text.
Example command line
Use cURL to send your request. Replace YOUR_API_KEY with your secret key. The example below generates a 3-second MP3 clip using the Aria voice.
curl -X POST "https://api.play45x.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Welcome to your course.", "voice": "aria", "response_format": "mp3"}' \ --output speech.mp3

Using the OpenAI SDK
The CourseAudio API mirrors the OpenAI speech endpoint structure, allowing you to use familiar libraries with minimal changes. This compatibility means you can leverage existing Python scripts by simply adjusting the connection details.
You only need to point the SDK to our base URL and provide your unique API key. This approach keeps your integration lightweight and avoids the need to learn a proprietary client library or manage custom HTTP headers.
Install the Python library
Use pip to install the official OpenAI client. This library handles the JSON serialization and response parsing for you.
Run the following command in your terminal to ensure you have the latest stable version installed locally.
- pip install openai
Set the base URL
Configure the SDK to target our API instead of OpenAI's servers. This ensures all requests are routed to the correct endpoint for audio generation.
Set the base URL to https://api.play45x.com/v1 to direct your calls to the CourseAudio service.
Configure the API key
Retrieve your secret key from the /get-api-key/ dashboard. Assign it to the API_KEY variable.
Pass this key to the OpenAI client initialization to authenticate your requests for audio synthesis.
Supported Audio Formats
CourseAudio supports five audio formats for your course files: mp3, wav, opus, flac, and pcm. Select the format that best fits your Learning Management System’s playback capabilities and your audience’s bandwidth constraints.
MP3 for web delivery
MP3 is the most widely supported format for web-based audio players. It offers a good balance between file size and audio quality, making it ideal for embedding directly into course modules or mobile apps without excessive data usage.
WAV for high quality
Choose WAV for uncompressed, high-fidelity audio. This format is perfect for premium courses where audio clarity is paramount, or for creators who plan to further edit the generated voiceovers in their production software.
Opus and FLAC options
Opus provides excellent compression for streaming or low-bandwidth environments, while FLAC offers lossless compression for archival purposes. Both are valid response formats you can specify in your API requests alongside PCM for raw data needs.
Voice Selection Guide
Choosing the right voice ensures your course audio matches the learning context. Each preset is optimized for specific tones, from warm narration to energetic promos, letting you maintain consistent branding across modules without hiring multiple voice actors.
All voices support the full range of 23 languages and can speak any language regardless of the preset. If your content is in a language other than English, always set the language parameter to avoid incorrect guessing.
Female voices: Aria, Nova
Use Aria for warm, clear narration in educational modules. Nova’s bright, upbeat tone works well for engaging intros or marketing-style course segments.
Both voices handle natural pacing well. For long texts, Aria’s clarity reduces listener fatigue, while Nova keeps energy high in shorter lessons.
- Aria: Warm, clear narrator ideal for step-by-step tutorials.
- Nova: Bright, upbeat tone for engaging introductions.
Male voices: Felix, Milo
Felix delivers an energetic, promo-style delivery suitable for sales pitches or highlight reels within your course. Milo offers a friendly, conversational tone perfect for direct-to-camera style explanations.
These voices add personality without sounding overly artificial. Use Milo for conversational Q&A sections and Felix for dynamic module transitions.
- Felix: Energetic, promo style for highlights.
- Milo: Friendly, conversational tone for explanations.
Neutral options: Atlas, Orion
Atlas provides a neutral, news-style delivery for straightforward content delivery. Orion offers a deep, documentary tone for serious or academic subjects.
These voices minimize emotional bias, making them ideal for technical documentation or formal training materials where clarity and neutrality are prioritized.
- Atlas: Neutral, news-style for clear delivery.
- Orion: Deep, documentary tone for serious subjects.

Handling Rate Limits
Rate limits protect our shared infrastructure, ensuring fair access for all course creators. Understanding these boundaries helps you avoid interruptions when generating audio for your courses or tutorials.
We enforce a limit of 60 requests per minute per API key. This allows steady processing without overwhelming the system during peak usage times.
60 requests per minute
Your single API key allows up to 60 synthesis requests every minute. If you need to generate audio for an entire course module, plan your requests accordingly to stay within this limit.
New accounts start with a lower limit of 10 requests per minute until the first top-up is processed. This ensures fair usage during the trial period.
- Limit: 60 requests/minute per key
- New accounts: 10 requests/minute initially
- Reset: Continuous sliding window
Queue behavior during load
Requests are processed sequentially. If you exceed the limit, subsequent requests may wait in a queue until slots become available.
Under heavy load, you might experience slight delays. This is normal and ensures audio quality remains consistent without compromising your generated files.
Monitoring your usage
Check your dashboard to track characters consumed and requests made. This helps you budget your $0.01 per 1,000 characters effectively.
Keep an eye on your balance to avoid unexpected pauses during course generation. Top-ups via USDT (TRC-20) are credited automatically within minutes.
Error Codes and Fixes
When integrating the CourseAudio API, encountering errors is part of the standard workflow. Understanding these common issues helps you maintain smooth audio generation for your online courses without unnecessary downtime.
This guide covers the most frequent response codes and how to resolve them quickly, ensuring your LMS pipeline stays efficient.
Invalid API key errors
If you receive a 401 Unauthorized error, your API key is either missing, incorrect, or has been revoked. Ensure you are passing the key via the Authorization: Bearer header exactly as shown in your dashboard.
- Check for trailing spaces in your key string.
- Regenerate a new key if the old one was compromised; the old one stops immediately.
Text length exceeded
Each request supports a maximum of 4096 characters in the input field. If your script sends longer text, the API returns a 400 Bad Request error. Split your content into smaller chunks before sending.
- Count spaces and punctuation as characters.
- Join the resulting audio files programmatically after successful synthesis.
Network timeout issues
Requests are processed one after another. Under heavy load, a request may wait in a queue. Implement retry logic with exponential backoff.
- Monitor your usage dashboard to anticipate high-volume periods.
- Ensure your HTTP client handles 503 Service Unavailable responses gracefully.

Best Practices for LMS
Streamline your LMS workflow by generating audio files in advance rather than on-the-fly. This ensures consistent delivery speeds and prevents student playback delays during peak class hours.
Implement caching for identical text inputs to avoid redundant billing. Since costs are per character, reusing pre-generated MP3 or WAV files for static course content significantly reduces your monthly spend.
Pre-generate audio files
Use a background script to convert your entire course syllabus into audio files before publishing. This shifts the processing load to off-peak times, ensuring your students never wait for synthesis.
Store the resulting audio files in your LMS media library. This approach is ideal for static lessons where the text rarely changes, providing a seamless playback experience for learners.
- Convert all lesson scripts into MP3s during off-hours
- Upload files directly to your LMS media library
- Ensure consistent playback speeds for all students
Cache responses when possible
Store the audio response locally if the input text remains unchanged. This avoids re-processing the same text through the API, saving both time and credits.
Since failed requests are free, you can retry synthesis without penalty.
- Store audio files locally for identical text inputs
- Avoid redundant API calls for static lessons
- Save credits by reusing generated audio files
Split long texts properly
Break texts into segments of up to 4096 characters per request. This ensures reliable synthesis and prevents errors from exceeding the character limit.
Join the resulting audio files sequentially to create a complete lesson track. This method maintains audio continuity while adhering to API constraints.
- Limit input text to 4096 characters per request
- Synthesize segments individually and join them
- Avoid errors by respecting character limits
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Build and manage your online courses effortlessly with our intuitive platform designed for non-technical creators.
23 languages
Any voice speaks any of these languages.
