Frequently asked questions
Can I call the API directly from a mobile app?
Yes, you can call the API directly from your mobile app. The endpoint accepts standard JSON bodies, and official OpenAI SDKs work by changing the base URL. This allows for straightforward integration without requiring a complex middleware layer for basic usage.
How do I split text for long chapters?
Split your text into parts of up to 4096 characters per request. Generate audio for each part individually, then join the resulting audio files in your app. This ensures you stay within the single-request character limit while delivering complete content.
Is it safe to store my API key in the app?
Storing the key in the app is possible but exposes it to reverse engineering. Since each account has one active key, compromised keys allow anyone to use your balance. For production apps, consider using a backend server to hide the key.
Do I need a backend server to hide the key?
A backend is not strictly required but recommended for security. It allows you to hide your API key from the client side. This prevents users from extracting your key and consuming your billing balance directly from their devices.
How do I handle rate limits on the client side?
You have a limit of 60 requests per minute per key. Implement exponential backoff in your app when you receive a rate limit error. This ensures your app waits appropriately before retrying, preventing excessive failed requests during high usage periods.
Can I cache the generated MP3 files?
Yes, you can cache generated audio files locally. Since the API does not store generated audio, you must manage caching yourself. Caching MP3s reduces bandwidth usage and improves load times for users listening to the same content repeatedly.
What is the best voice for a story app?
Luna is described as soft and storytelling, while Aria is a warm, clear narrator. We do not rank voices as 'best.' Choose Luna for a gentle narrative experience or Aria for clarity in complex texts. Both support all 23 languages and work with any model. Select the preset that matches your app’s specific tone and voice style.
Does the API work offline?
No, the API is cloud-based and requires an internet connection. You must send text to the endpoint to receive audio. Offline functionality depends on your app caching previously generated audio files, as the synthesis happens on our servers.
How do I implement a speed slider?
Use the speed parameter in your request, accepting values from 0.25 to 4.0. Map your UI slider to this value. For example, a 2x speed setting sends a speed value of 2.0 to the API for faster playback.
Can I use the same key for multiple users?
Yes, one API key serves your entire account. However, all usage counts against your single balance. If multiple users share one key, they share the rate limit of 60 requests per minute, which may cause queuing during peak times.
How do I detect the user's language?
Set the language parameter to the ISO code if known. If omitted, the API guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly setting the language ensures accurate synthesis and avoids misinterpretation.
Is there a limit on concurrent requests?
Requests are processed sequentially, so there is no strict concurrency limit, but long texts take time. Under load, requests may wait in a queue. Expect roughly real-time generation speed, meaning longer texts will take proportionally longer to process.
Do I need to pay for every user separately?
No, you pay based on total characters generated across all users. Your single API key covers all usage. You are charged $0.01 per 1,000 characters, regardless of how many users generate audio, making it cost-effective for indie apps.
How do I handle failed audio downloads?
If synthesis fails, the charge is returned in full. Implement retry logic in your app to request the audio again. Ensure your app handles network errors gracefully, as failed requests do not incur costs, allowing safe retries.
Preparation
Start by creating an account on our site. You can sign in quickly using Google or register with an email and password. This process is straightforward and sets up your workspace for mobile development.
Once registered, you will generate your API key. This key authenticates your requests to the TTS endpoint. Keep it secure, as it is the only credential needed to access the service and incur charges.
Create an account
Visit the /get-api-key/ page to register. You can choose Google OAuth for instant setup or use a standard email and password. Accounts are specific to this storefront.
The registration process is minimal. You do not need to provide payment details immediately. Your account is ready for use as soon as the sign-up flow completes.
- Sign up via Google or email/password
- Instant account creation
- No payment required to start
Generate API key
After logging in, your unique API key is displayed on your dashboard. Use this key in the Authorization: Bearer header for all API calls. The key format begins with tts-.
You can issue a new key at any time. When you generate a new key, the previous one becomes inactive immediately. This ensures you can revoke access if a key is compromised.
- Key format:
tts-... - One active key per account
- Instant invalidation of old keys
Check balance status
Your dashboard shows your current balance, trial status, and characters used. New Google sign-ins receive a $0.50 trial credit, valid for 7 days. Email-based accounts start with zero balance.
You can monitor your usage in real-time. The interface displays remaining characters and current spend, helping you manage costs for your mobile app's narration features.
- $0.50 trial for Google sign-ins
- Real-time balance tracking
- Character count monitoring
Client-side integration
Mobile developers often wonder whether to call the TTS API directly from their app or route requests through a backend proxy. Both methods are valid, but they serve different architectural needs regarding security and network efficiency.
Direct API calls
Sending requests directly from the iOS or Android client is straightforward. You pass your API key in the Authorization header and receive an audio file via POST https://api.play7u77.com/v1/audio/speech. This reduces server costs but exposes your key to the client app.
- Simple implementation for low-volume apps
- No extra server infrastructure required
- Key exposure risk in client-side code
Proxy server approach
A backend proxy hides your API key from end-users. The mobile app sends text to your server, which then forwards the request to the TTS API. This is preferred for apps with many users or where key theft would incur significant costs.
- Centralized key management
- Ability to add custom logic (e.g., usage limits)
- Hides credentials from the client
Security considerations
Regardless of the approach, protect your API key. If using direct calls, consider rotating keys frequently since you can issue a new key instantly. Monitor usage via the dashboard to detect unusual activity. Avoid hardcoding keys in publicly accessible repositories.
- Rotate keys via the dashboard
- Monitor usage for anomalies
- Avoid hardcoding keys in source control

Handling large texts
The API limits each request to 4,096 characters. For longer narratives common in mobile apps, you must split the input text into chunks and join the resulting audio files. This ensures reliable synthesis without truncation errors.
Our recommended workflow splits text by sentence boundaries where possible, ensuring natural pauses between concatenated segments. The client app receives multiple audio blobs that can be stitched together seamlessly for playback.
Splitting input text
Divide your string into 4,096-character segments. Prioritize splitting at punctuation marks to avoid cutting mid-sentence, which creates unnatural audio gaps during playback.
Ensure your splitting logic accounts for spaces and punctuation, as these count toward the character limit. This prevents unexpected truncation of your final audio output.
- Max 4,096 characters per request
- Split at sentence boundaries for natural pauses
- Include spaces and punctuation in count
Concatenating audio
Combine the returned audio files sequentially. Since requests are processed one after another, longer texts may queue, so implement buffering in your app to avoid playback stutter.
Use standard audio libraries to merge MP3 or WAV files. The synthetic watermark remains inaudible and does not affect concatenation quality.
Managing chunk limits
Track character counts carefully. Exceeding 4,096 characters in a single POST request will fail the synthesis, though failed requests are free.
Monitor your balance. At $10 per million characters, splitting efficiently avoids unnecessary API calls while maintaining audio continuity.
Audio format selection
Selecting the right audio format balances file size and compatibility. MP3 is a common choice for mobile apps due to its efficient compression, while WAV offers uncompressed clarity. Both formats are fully supported by our API.
Choosing MP3 vs WAV
MP3 files are smaller, reducing download times and storage needs on user devices. WAV files are larger but require less processing to decode, which can be beneficial for older hardware. Choose MP3 for general narration and WAV if your app prioritizes immediate playback without decoding overhead.
- MP3: Smaller files, better for bandwidth-constrained users.
- WAV: Uncompressed, simpler decoding for legacy devices.
Bandwidth optimization
Use MP3 for long-form content to minimize data usage. For short UI sounds, WAV’s simplicity might offset the larger file size with faster processing. Always consider the user’s network environment when deciding between compressed and uncompressed audio.
Quality settings
Our API returns high-quality audio in all supported formats (mp3, wav, opus, flac, pcm). The speed parameter (0.25–4.0) affects duration but not inherent quality. No additional quality presets are available; the engine delivers consistent output across all formats.
Error management
Mobile apps face unpredictable networks. Handling API failures gracefully ensures a smooth user experience even when connectivity drops or servers are busy.
Network timeouts
Set reasonable timeout limits (e.g., 10-15 seconds). Short texts generate quickly, but long texts may queue, requiring patience.
Rate limit retries
You have 60 requests per minute. If you hit the limit, wait and retry with exponential backoff. New keys reset limits.
- Monitor
429 Too Many Requestsresponses - Implement jitter in retry delays
Failed request handling
If synthesis fails, you get a full refund. Do not charge the user. Log the error and allow retry or fallback.
- Check status codes
- Refund user credits automatically
Testing locally
Before integrating into your mobile app, verify your API credentials and endpoint connectivity using standard developer tools. This ensures your account is active and your key has sufficient balance to process requests without unexpected failures during initial development.
Testing locally allows you to validate request shapes, audio formats, and voice outputs in a controlled environment before committing to client-side code or backend proxy logic.
cURL command testing
Use cURL to send a POST request to https://api.play7u77.com/v1/audio/speech with your Bearer token. This confirms network connectivity and correct authentication without writing app code. Verify the response contains a valid audio file in your chosen format, such as MP3 or WAV.
Ensure your rate limit of 60 requests per minute is not exceeded during rapid local tests. Check that the response headers include correct content types for your selected audio format.
- Set
Authorization: Bearer tts-...header. - Send JSON body with
model,input,voice, andresponse_format. - Verify binary audio data in response body.
OpenAI SDK setup
Leverage the OpenAI SDK by changing the base_url to https://api.play7u77.com/v1. This allows you to reuse existing client code with minimal modifications, as the request shape matches the OpenAI speech endpoint. This is ideal for quick prototyping in your preferred language.
Authenticate using your single active API key. Note that the SDK handles retries and basic error formatting, but you must still manage rate limits and chunking for long texts manually if needed.
- Set
base_urltohttps://api.play7u77.com/v1. - Use standard
Speech.create()method. - Pass your
tts-...API key for authentication.
Mock response verification
While our API returns real audio, you can verify your integration logic by checking response status codes and headers. Ensure your app correctly handles binary data streams or file writes. This step confirms your code structure is sound before relying on live synthesis speeds.
Verify that failed requests return appropriate error codes without charging your balance. This ensures your error handling logic correctly distinguishes between network issues and API errors.
- Check HTTP 200 status for success.
- Validate binary output size matches expected audio length.
- Confirm error codes for invalid inputs.
Production deployment
Key rotation strategy
Generate a new key via the dashboard; the old key stops immediately. Rotate keys in your app config or via a remote config service to avoid downtime during the switch.
- New keys invalidate old ones instantly.
- Use remote config for zero-downtime swaps.
Monitoring usage
Track request volume and errors via the dashboard. Set up alerts for rate limit hits (60 req/min) to prevent throttling during peak usage.
- Monitor real-time usage stats.
- Set thresholds for rate limits.
Cost tracking methods
Calculate costs based on character count ($0.01 per 1,000 chars). Track usage in-app to warn users before they exceed their balance.
- Track character count accurately.
- Implement in-app balance warnings.

Voice selection strategy
Selecting the right voice is critical for mobile user retention. Our eight presets cover distinct tones, from Aria’s warm narration to Felix’s energetic promo style. Choose based on your app’s core content to ensure the audio feels native to the experience rather than an afterthought.
Matching voice to content
Align voice characteristics with your app’s primary use case. Use Atlas for news aggregators or Luna for storytelling games. The voice remains consistent across all languages, so a narrator works well whether the user reads English or Japanese.
- Use Aria for clear, instructional onboarding flows.
- Select Milo for conversational, friendly chat interfaces.
- Pick Orion for deep, documentary-style long-form reading.
User preference settings
Allow users to switch voices in your settings menu. Since each voice supports all 23 languages, you can offer a global library without managing multiple voice assets. Store the user’s last selection locally to reduce API calls on subsequent app launches.
Consistent branding
Stick to one primary voice to build auditory brand recognition. Avoid switching voices randomly within the same session. If you use multiple voices for different features, clearly distinguish them through UI labels so users understand why the tone changes.
Language handling
Language handling in mobile apps requires careful management of input text and response formats. The API supports 23 languages, with auto-detection working for most cases. However, explicit language tags ensure accurate synthesis for non-English texts using Latin script.
Auto-detection limits
By default, the API guesses the language from the script. Latin script defaults to English, so non-English texts like Dutch or Swedish should explicitly set the language parameter to avoid incorrect pronunciation.
Explicit language tags
Use the language field in the request body to specify ISO codes (e.g., "de", "fr"). This ensures consistent voice output regardless of the input text's script, preventing misinterpretation of special characters or names.
Multi-language apps
For apps supporting multiple languages, define a mapping of user preferences to voice settings. Each voice can speak any of the 23 supported languages, allowing a single voice preset to be used across different linguistic contexts.
Performance optimization
Mobile apps benefit significantly from caching synthesized audio to minimize repeated API calls and reduce data usage. Since input texts are deterministic, storing generated MP3 files locally allows instant playback for repeated phrases without hitting rate limits or incurring additional character costs. This approach is particularly effective for static app content like help screens or menu descriptions.
Pre-fetching segments involves generating audio for likely next steps during idle periods. By anticipating user navigation paths, your app can have ready-to-play audio files, effectively eliminating perceived latency during interactions. This ensures a smooth narrative flow, keeping the user immersed without waiting for network responses during active usage.
Caching generated audio
Store synthesized audio files in the app's local storage. Map unique text inputs to cached file paths. Invalidate cache when text content updates.
This reduces both bandwidth consumption and processing delays for recurring phrases.
- Cache static UI narration strings.
- Use unique keys for text variations.
- Clear cache on app updates.
Pre-fetching segments
Generate audio for anticipated user actions during background idle time. Store these segments in a temporary queue. Prioritize high-probability navigation paths to optimize storage.
This strategy minimizes wait times during active navigation sequences.
- Pre-load next-screen audio.
- Use background threads.
- Limit queue size to save space.
Reducing latency
Optimize network requests by using efficient protocols. Choose MP3 for smaller file sizes to speed up transmission. Balance quality settings to ensure quick delivery without compromising intelligibility.
Combine caching and pre-fetching to handle variable network conditions effectively.
- Select MP3 for smaller payloads.
- Use background processing.
- Monitor network conditions.
Billing integration
Integrating billing into your mobile app requires precise tracking of character usage, as costs are calculated at $0.01 per 1,000 characters. Spaces and punctuation count toward this total, so your client-side logic must account for the full input string length before sending requests to the API.
For apps with internal user accounts, implement a credit system that mirrors your API balance. Deduct characters from user wallets before each synthesis call to prevent unexpected charges. Since failed requests are free, only successful generations consume credits, ensuring accurate billing for your end-users.
Tracking character counts
Calculate the exact character count of the input text locally before initiating the API call. This ensures you know the exact cost ($0.01 per 1,000 characters) and can verify the API response matches your expected charge. Remember that the 4,096 character limit per request affects how you split long texts.
Use the input field length as your source of truth. If you split text into chunks, sum the lengths of all chunks to determine the total billable characters. This prevents overcharging users for text that was processed in multiple requests.
- Count spaces and punctuation as characters
- Verify API response matches local calculation
- Sum chunk lengths for split texts
User credit systems
Deduct credits from user balances before sending the request to ensure funds are available. If the API returns a success status, the deduction is valid. If the synthesis fails, the API returns the charge, so your system should refund those credits to the user's wallet.
Store the user's API key securely or use a proxy to manage keys. Track the remaining balance in your database, updating it after each successful or failed request to maintain consistency between your app's credits and your actual API usage.
- Pre-deduct credits before API call
- Refund credits on failed synthesis
- Sync local balance with API status
Usage alerts
Notify users when their internal credit balance drops below a threshold, such as 10% of their total. This prevents interruptions during narration playback due to insufficient funds. You can also alert your own team if your API balance is low, allowing timely top-ups via USDT.
Set up periodic checks to compare your recorded usage against your actual API balance. Discrepancies may indicate bugs in your deduction logic or unexpected usage spikes. Regular audits help maintain trust and ensure accurate billing for your app's subscribers.
- Alert users at 10% balance
- Notify team of low API balance
- Audit usage vs. API balance regularly
Compliance and rights
Our voices are derived from licensed recordings under specific open licenses, ensuring clear rights for generated audio. Every file includes an inaudible watermark to mark it as synthetic speech, distinguishing it from natural recordings.
Voice license terms
Voices originate from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobooks. This foundation provides a robust legal basis for commercial integration without complex royalty tracking.
Synthetic watermarking
Each generated audio file carries an inaudible watermark. This marks the content as synthetic speech, providing transparency regarding the origin of the audio without affecting playback quality.
Commercial use rights
Generated audio is yours to use within your mobile app. Input text is used only for synthesis and not for training, ensuring your content remains private and secure.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Design intuitive interfaces that resonate with users to boost your mobile app adoption.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- Python documentation
- LibriTTS-R paper (arXiv 2305.18802)
- W3C WAI: making audio and video accessible
- ISO 639 language codes
- OpenAI API reference: create speech
- Creative Commons Attribution 4.0
- curl documentation
- LibriVox public-domain audiobooks
- FFmpeg documentation
- MDN: Web Speech API
- IETF RFC 7845: Ogg Opus
