Frequently asked questions
What is text-to-speech in Python?
Text-to-speech (TTS) in Python converts written text into spoken audio files. Using our API, you send a POST request with your script and receive an audio file like MP3 or WAV. This allows podcast creators to automate narration generation directly within their Python workflows.
How does Python TTS differ from other methods?
Our API follows the standard OpenAI request shape, meaning you can use official OpenAI SDKs by simply changing the base URL. This compatibility simplifies integration for Python developers. We offer transparent pricing, TRC-20 USDT top-ups, and no monthly plans.
Is the API reliable for long podcast scripts?
Yes, but you must split texts exceeding 4096 characters into smaller parts and join the resulting audio files. Requests are processed sequentially, so under load, your request may wait in a queue. Typical generation speed is roughly real-time.
Can I use Python to generate audio for multiple languages?
Absolutely. Our API supports 23 languages, including English, Spanish, German, French, Japanese, and Hindi. You can specify the language using an ISO code in your Python request. If omitted, the system guesses the language, defaulting to English for Latin script text.
How much does it cost to generate audio with Python?
Pricing is $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count toward this total. Failed requests are free, with charges returned in full. This flat rate model ensures predictable costs for your podcast production, regardless of the voice model or speed you choose.
Do I need to pay upfront for the API?
You start with a $0.50 free trial (valid for 7 days) if you sign in with Google. Otherwise, you top up using USDT on the TRON network (TRC-20) with a minimum of $5. Credits are credited automatically within minutes, and your balance never expires, allowing flexible usage for your podcasts.
Can I generate audio faster than real-time?
Generation speed is roughly real-time, averaging about 25 characters of text per second of audio. While you can adjust the speed parameter between 0.25 and 4.0, the actual processing time depends on server load. Requests are processed sequentially, so longer texts may take longer to generate than the audio duration itself.
What happens if the API request fails?
If synthesis fails, the charge is returned in full. You do not lose any credit for unsuccessful attempts. This ensures you only pay for successfully generated audio files. You can retry your Python request with adjusted parameters, such as splitting long texts or checking voice availability, without financial penalty.
Are there any character limits for my scripts?
Each API request accepts up to 4096 characters of input text. For longer podcast scripts, you must split the text into chunks of this size and join the resulting audio files in your Python code. This ensures consistent quality and manageable processing times for each segment of your narration.
Can I change the voice speed in Python?
Yes, you can adjust the speed parameter between 0.25 and 4.0 in your request body. This allows you to create slower, clearer narration or faster, energetic promos. The eight available voices can all be adjusted to fit your podcast’s tone.
Does the API support SSML in Python requests?
No, the API does not support SSML (Speech Synthesis Markup Language). You send plain text in the input field. If you need specific pauses or emphasis, you must manage this by splitting your text into separate requests or adjusting the overall speed parameter to control the pacing of your audio.
Can I clone my own voice for podcasts?
No, we do not offer custom voice cloning. You choose from eight preset voices based on licensed recordings, such as Aria, Nova, or Atlas. These voices are distinct.
Is my input text used for training models?
No, your input text is used only to produce the audio file and is not used for training models. Generated audio is returned in the response and not stored. We keep request metadata like time and character count for billing purposes, ensuring your content remains private and secure for your podcasts.
First request
curl
curl https://api.apatu.cc/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.mp3Why Podcasters Choose Python for TTS
Python allows podcasters to script their entire narration workflow. You can process a markdown outline, split chapters, and feed them directly into the TTS API without manual file management.
Automate script-to-audio workflows
Stop manually generating audio files one by one. Write a simple Python script that reads your episode script, splits it into manageable chunks, and sends them to the API in sequence. The script handles the logic, so you focus on the story.
Integrate with existing production tools
Your editing suite likely already has a Python ecosystem. Use libraries like requests or the OpenAI SDK to integrate TTS directly into your existing pipeline. No need to learn a new proprietary interface or drag-and-drop tool.
- Use standard
requestslibrary - Compatible with OpenAI SDK
- No custom SDK required
Scale episode generation effortlessly
Whether you produce one episode a week or daily, Python handles the repetition. Increase your output volume by simply adjusting the loop in your script.
Our Python-First API Design
Our API mirrors the OpenAI speech endpoint structure, allowing you to swap the base URL without rewriting your Python code. This compatibility means you can use the official OpenAI SDKs or simple HTTP requests, keeping your integration lightweight and familiar.
Send a standard JSON payload with your script and voice preference. The endpoint returns an audio file directly, making it easy to pipe output into your podcast production pipeline or save it for later editing.
OpenAI-compatible endpoint structure
We use the exact same endpoint path and JSON body shape as the OpenAI speech API. This means your existing Python scripts for other TTS services can often be adapted by simply changing the base_url to https://api.apatu.cc/v1. It reduces boilerplate and lets you focus on content rather than API quirks.
Simple JSON requests with Python
Construct your request with standard Python dictionaries. You only need to provide the model, input text, and voice. The API handles the rest, returning the audio binary directly in the response body. This simplicity is ideal for freelancers who want to automate episode generation without complex client libraries.
Works with standard libraries
You do not need a dedicated AudioGen SDK. Standard libraries like requests or urllib work perfectly. This ensures your code remains portable and easy to maintain, using tools you already know and trust in your Python environment.
Voice Options for Podcast Narration
Podcast narration requires a specific tonal balance that generic text-to-speech engines often miss. AudioGen offers eight distinct voice presets designed to match the diverse segments of a podcast, from deep-dive interviews to high-energy show intros.
Each voice is based on licensed recordings from LibriTTS-R and LibriVox. You can select the perfect tone for your script, whether you need a soothing guide or a dynamic announcer.
Whether you are producing a solo narrative or a multi-host show, our API lets you switch voices between segments seamlessly. This flexibility helps maintain listener engagement while keeping your production workflow simple and consistent.
Warm narrator voices for storytelling
Aria offers a warm, clear narration style ideal for narrative podcasts and audiobooks. Her tone is engaging yet unobtrusive, allowing the story to take center stage without distracting the listener.
Luna provides a soft, storytelling voice.
- Aria: Clear, warm narration for general storytelling
- Luna: Soft, expressive tones for emotional narratives
Energetic voices for promos
Felix brings high energy and enthusiasm to your show, making him perfect for ad reads, segment transitions, or hype intros. His dynamic delivery captures attention quickly.
Milo offers a friendly, conversational tone that feels like a natural extension of your podcast’s personality. He works well for casual banter, sponsor mentions, or community updates where a relaxed vibe is preferred.
- Felix: High-energy delivery for promos and ads
- Milo: Friendly, conversational tone for casual segments
Calm tones for instructional content
Sage delivers a calm, instructional voice ideal for educational podcasts, tutorials, or interview summaries. His steady pace and neutral clarity help listeners absorb complex information.
Atlas provides a neutral, news-style delivery suitable for factual reporting or data-driven episodes. His consistent tone ensures clarity and professionalism, making complex topics easier to follow for your audience.
- Sage: Calm, clear instruction for educational content
- Atlas: Neutral, professional tone for news and facts
Support for Multiple Languages
AudioGen supports 23 languages, from Arabic to Turkish, allowing you to reach a global audience. Every voice can speak any of these languages, giving you flexibility in casting your podcast hosts or narrators without needing multiple voice actors.
We handle language guessing automatically, but for Latin-script text that isn't English, you should explicitly set the language code. This ensures accurate pronunciation and avoids misinterpretations, keeping your narration clear and professional for international listeners.
23 languages supported globally
Our API covers major markets including English, Spanish, German, French, Japanese, and Hindi. You can generate episodes in any of these 23 languages using the same simple Python script, making it easy to create multilingual content for your show.
- Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
Automatic language detection
If you omit the language field, the system guesses the language based on the text script. For example, Latin script defaults to English, but you can override this. This works well for single-language episodes.
Explicit language control for accuracy
For non-English text using Latin characters, always set the language parameter. This prevents the AI from defaulting to English pronunciation. It ensures that your narration sounds natural and accurate, which is crucial for maintaining listener engagement in foreign languages.
Fast and Reliable Generation
AudioGen processes text at roughly real-time speed, generating approximately 25 characters of audio per second for long scripts. This steady pace ensures that your podcast narration is produced efficiently.
Real-time processing for long texts
Long scripts are split into 4096-character segments and joined seamlessly. While short phrases may take a few seconds to generate, longer content is processed at a rate that matches real-time playback, allowing you to focus on content rather than waiting for files.
- Approx. 25 characters generated per second of audio
- Splits large texts into manageable 4096-character chunks
- Joins audio segments automatically for continuous playback
Queue management during peak loads
Requests are processed sequentially, so under load a request may wait in a queue. If the system is busy, your request waits in a queue rather than failing.
- Requests are processed one after another
- Queueing prevents data loss during high traffic
- Minor delays possible when demand is high
Consistent output quality
Every audio file maintains the same voice characteristics and clarity, whether you are generating a short intro or a full episode. The engine delivers reliable narration that matches the selected voice preset.
- Uniform voice quality across all generations
- No degradation in audio clarity for long scripts
- Reliable output matching your selected voice preset

Transparent Pricing for Freelancers
AudioGen charges $0.01 per 1,000 characters, ensuring you only pay for what you actually generate. Spaces and punctuation count toward this limit, making cost prediction straightforward for your podcast scripts. Failed requests are free, so you never pay for errors.
Pay only for characters used
With a rate of $10 per million characters, you can generate extensive episode content without breaking the bank. This model scales naturally with your output, whether you are producing a short intro or a full-length show.
- $0.01 per 1,000 characters
- Spaces and punctuation count
- Failed requests are free
No monthly subscriptions required
There are no seats, minimum spends, or recurring fees. You top up your balance with USDT on the TRON network, and the credit never expires. This pay-as-you-go approach fits irregular freelance workflows perfectly.
Free trial to test the service
Sign up with Google to receive $0.50 in trial credit, enough for about 50,000 characters. The credit is valid for 7 days, giving you ample time to test voice quality and integration before committing to a top-up.
How It Works: From Text to Audio
The workflow begins by sending your podcast script to our API. You structure a simple JSON payload with your text, chosen voice, and desired format, then POST it to the endpoint. This straightforward approach lets you integrate TTS directly into your Python production scripts without wrestling with complex SDKs.
Send your script via Python
Use the requests library to send your text. You can split long scripts into 4096-character chunks to ensure reliable processing. The API handles the heavy lifting, converting your written words into synthetic speech instantly.
Receive audio files
Once submitted, the server processes your request and returns the audio file in the specified format (MP3, WAV, etc.). For short phrases, generation takes a few seconds; longer texts may queue during peak loads but process in roughly real-time.
Download or stream the result
The API returns the audio data directly in the response. You can save the file to your local drive or pass it directly into your podcast editing software. This approach keeps your podcast production pipeline simple.
Technical Specs for Developers
AudioGen is built for developers. By leveraging the standard OpenAI-compatible endpoint structure, you can integrate high-quality narration into your existing Python workflows without learning a new proprietary system. The API accepts standard JSON bodies, making it easy to handle via requests or any compatible HTTP client.
Support for MP3, WAV, OPUS, FLAC, PCM
Choose the format that best fits your podcast hosting platform or editing software. MP3, WAV, OPUS, FLAC, and PCM are available. OPUS and PCM are available for specific technical requirements.
Speed control from 0.25x to 4.0x
Adjust the narration pace to match your show’s tone. Whether you need a slow, storytelling cadence or a fast-paced promo, the speed parameter lets you fine-tune the delivery.
Character limit of 4096 per request
Each API call supports up to 4096 characters of input text. For longer scripts, split your content into chunks and join the resulting audio files. This approach keeps requests manageable and ensures consistent generation quality across your entire episode.
Getting Started with Python
Start by signing up on our /get-api-key/ page using your Google account or email. You will receive a unique Bearer token immediately, along with $0.50 in free trial credit valid for seven days.
Test your integration quickly using the provided curl command to verify connectivity. Once confirmed, switch to the Python requests library for seamless production workflows, keeping your code clean and efficient.
Sign up for an API key
Visit the /get-api-key/ page and authenticate via Google or email. Your account dashboard displays your active API key, current balance, and usage statistics, allowing you to monitor character consumption in real-time.
- Google or email authentication
- Instant API key generation
- Real-time balance monitoring
Use our curl example to test
Copy the ready-made curl command from your dashboard. This request sends a short text sample to our API, returning an audio file directly in your terminal. It confirms your key works before you write custom code.
Use this step to verify rate limits and endpoint responsiveness. Since requests are processed sequentially, you can ensure your setup handles the queue correctly under light load.
- Direct terminal testing
- Verify API key validity
- Check endpoint responsiveness
Switch to Python requests library
Replace the curl command with Python’s requests library for your podcast scripts. Pass your text, voice selection, and desired format (mp3, wav, opus, flac, or pcm) in the JSON body.
Handle the response by saving the binary audio data to a file. This approach keeps your podcast production pipeline simple, letting you focus on content rather than complex SDK integrations.
- Use standard
requestslibrary - JSON body configuration
- Save binary audio output
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Listen for pacing, clarity, and whether the voice matches your show’s vibe before committing to full episode narration.
23 languages
Any voice speaks any of these languages.
