Frequently asked questions
Should I call the API from the app or server?
Calling from your server is safer to protect your API key. The API accepts requests via POST with a Bearer token. While you can call it directly from the app, exposing your key in client-side code risks unauthorized usage. Using a backend proxy ensures your credentials remain secure while handling authentication and billing.
How do I store audio files?
The API returns audio in the response but does not store it. You must save the file locally on the device or your server. Generated audio is not retained by our service. For long texts, you receive multiple audio files that you should concatenate or store individually based on your app’s architecture.
Can I play audio directly from memory?
Yes, you can stream the audio data directly to your player without saving to disk. The API returns the audio file in the response body. This reduces storage overhead and is ideal for short phrases. Ensure your mobile SDK supports streaming audio buffers for seamless playback without intermediate file creation.
How do I handle rate limits?
You have a limit of 60 requests per minute per key. Before your first top-up, this drops to 10 per minute. Implement exponential backoff or a queue system in your app to handle retries. Monitor your usage dashboard to stay within limits and avoid request failures during peak usage times.
What is the best format for mobile?
MP3 is a common choice for mobile due to its small file size and broad compatibility. You can also choose WAV, OPUS, FLAC, or PCM. MP3 offers a good balance between quality and bandwidth. Select the format that fits your app’s storage constraints and player capabilities.
How do I manage API keys?
Each account has one active key. You can issue a new key at any time via the dashboard, which immediately invalidates the old one. Rotate keys regularly for security. Store the key securely in your app’s configuration or backend environment variables. Never hardcode keys in publicly accessible source code.
Can I use this offline?
No, the API is cloud-based. You need an internet connection to send text and receive audio. The service does not offer an offline SDK or local processing. Ensure your app handles network connectivity gracefully, caching audio files when possible to reduce reliance on continuous connectivity for repeated content.
How do I split long texts?
The API accepts up to 4096 characters per request. For longer texts, split the input into chunks of this size. Send each chunk separately and concatenate the resulting audio files. This ensures reliable synthesis and avoids exceeding character limits. Handle the concatenation logic in your app or backend before playback.
What if the network fails?
If synthesis fails, the charge is returned in full. Your app should handle HTTP errors and retry the request. Network interruptions may cause delays. Implement robust error handling to retry failed requests. Failed requests are free, so you can safely retry without worrying about additional costs during unstable network conditions.
How do I test latency?
Typical speed is roughly real-time, about 25 characters per second. Short phrases take a few seconds. Requests are processed sequentially, so load may cause queue delays. Test with various text lengths and concurrent requests. Use the /v1/voices endpoint to verify configuration before integrating the speech endpoint into your app.
Is caching recommended?
Yes, caching is recommended to save costs and reduce latency. Since the API does not store generated audio, you should cache files locally on the device. This is especially useful for static content like menu items or instructions. Caching reduces API calls and provides instant playback for repeated audio segments.
Can I change voices dynamically?
A: Yes, you can change voices dynamically by updating the voice parameter in your API request. Choose from eight presets like Aria, Nova, or Felix. You can switch voices per request without re-authenticating.
How do I handle errors gracefully?
Check the HTTP status code and response body for error details. Common errors include rate limits or invalid inputs. Implement retry logic with exponential backoff for transient errors. Failed requests are free, so retries are safe. Log errors for debugging and inform users if audio generation fails due to network or quota issues.
Do I need a backend for this?
A backend is recommended to secure your API key and manage rate limits. While you can call the API directly from the app, a backend allows for better key management and request aggregation. It also simplifies handling long text splitting and audio concatenation, providing a more robust and secure integration experience.
Preparation
To start using Voxify in your mobile app, you need a valid API key. Sign up on the /get-api-key/ page using Google or an email address. This creates your account and gives you access to the dashboard where you can manage your credits and usage.
Create an account
Visit the registration page and choose either Google sign-in or standard email registration. Google sign-ups include a $0.50 free trial valid for 7 days, while email accounts start with zero credit. Accounts are tied to this specific site domain.
Generate API key
Once logged in, navigate to the dashboard to view your API key. You can issue a new key at any time, which immediately invalidates the previous one. Keep this key secure, as it authenticates all your requests.
- Use Google or email + password for registration
- Keys are single-active; new keys invalidate old ones instantly
- Start with email/password for no trial credit
Test credentials
Verify your key works by making a simple request to the API. Use the provided curl example on the dashboard to ensure your key is active and your balance is visible before integrating into your app code.
- Check the dashboard for your current balance
- Use the ready curl example for testing
- Confirm the key returns a valid response
Client Side vs Server Side
For indie mobile developers, the choice between direct API calls and a proxy server hinges on security versus simplicity. Direct integration keeps your architecture lightweight, allowing your app to generate speech on-the-fly without managing a separate backend service. This approach reduces latency and complexity, which is ideal for small-scale projects where every byte matters.
However, exposing your API key in the client app carries risks. A proxy server acts as a middleman, hiding your credentials while allowing you to enforce rate limits or add usage tracking. For most indie apps, starting with direct calls is sufficient, but migrating to a proxy becomes necessary as your user base grows and you need stricter control over key exposure.
Direct API calls from app
Calling the API directly from your mobile app is the fastest way to get started. You simply send a POST request to the speech endpoint with your text and desired voice parameters. This method is perfect for prototyping or apps with low volume, as it eliminates the need for additional server infrastructure.
Keep in mind that your API key will be embedded in your app’s binary or visible via network inspection. For most indie projects, this risk is acceptable, especially since you can rotate keys instantly if needed. Use HTTPS to ensure the payload and key are encrypted in transit.
- Low latency for short phrases; long texts generate at roughly real-time speed
- No additional backend costs or maintenance
- Simple to implement with standard HTTP libraries
Proxy server for security
A proxy server sits between your mobile app and the TTS API, hiding your API key from end-users. It can also handle request validation, logging, or even cache responses to reduce costs. This setup is ideal if you plan to monetize the app or if your app is distributed to a large audience.
While adding a proxy introduces some complexity, it provides a layer of security and control. You can restrict which voices or formats are available to users, or even bill them internally based on usage. This is a common pattern for apps that want to keep their API credentials secure.
- Hides API key from reverse engineering
- Allows custom logic like caching or throttling
- Enables better monitoring and billing integration
Key management strategies
Since you have one active key per account, rotating keys is straightforward. If you suspect a leak, issue a new key via the dashboard, and the old one stops immediately. This minimizes downtime and ensures that only authorized users can access your API.
For apps using a proxy, you might use a single key for the proxy to call the API. For direct calls, consider generating a key per app version or user tier if you need to track usage more granularly. Always store keys securely, preferably in environment variables or secure storage on the device.
- Issue new keys instantly; old ones expire immediately
- Use environment variables for key storage
- Rotate keys regularly for added security
Making the Request
Generating audio is a straightforward POST request. You send your text payload and receive an audio file in return, keeping the integration logic simple for mobile architectures.
The API expects a specific JSON structure. Ensure your payload includes the model, input text, voice selection, and desired output format to get the correct audio file.
Construct JSON body
Send a POST request to https://api.88newok.com/v1/audio/speech. The body must include model (e.g., "tts-1"), input (your text string), voice (one of the 8 presets), and response_format (mp3, wav, opus, etc.).
Keep the input text under 4096 characters. If your script exceeds this, split it into chunks before sending.
- model: "tts-1" or "tts-1-hd"
- input: string up to 4096 chars
- voice: e.g., "nova", "atlas"
- response_format: "mp3", "wav", "opus"
Set headers correctly
Include Content-Type: application/json to define the payload format.
Pass your API key in the Authorization header as Bearer tts-....
- Content-Type: application/json
- Authorization: Bearer tts-...
Handle HTTPS requests
Use standard HTTP clients available in your mobile framework (e.g., OkHttp for Android, URLSession for iOS).
Ensure your app handles SSL certificates properly to secure the API key transmission.
Processing Response
The API returns raw binary audio data in the HTTP response body. This data is not JSON but a direct stream of the requested format, allowing for immediate consumption by your mobile app's audio engine without intermediate parsing steps. Ensure your HTTP client is configured to handle binary payloads correctly rather than decoding them as text strings.
Once received, you can choose to play the audio instantly or persist it for offline use. Mobile platforms handle these binary streams efficiently, but you must manage memory carefully if processing large files. The response time is typically fast for short phrases, though longer texts may take a few seconds to generate.
Receive binary audio data
The response body contains the raw audio bytes corresponding to the response_format you requested. Your mobile client should read this data directly into a buffer. Do not attempt to parse it as JSON; the entire body is the audio file itself. This direct response minimizes latency and memory overhead on the device.
For optimal performance, stream the data directly to an audio decoder if your platform supports it. This avoids holding the entire audio file in RAM, which is crucial for maintaining app responsiveness, especially when handling larger voice outputs or multiple concurrent requests.
- Verify the Content-Type header matches your requested format (e.g., audio/mpeg).
- Ensure your HTTP client disables automatic JSON decoding for the response body.
- Check the Content-Length header to anticipate memory requirements for local storage.
Save to local storage
To enable offline playback or reduce repeated API calls, save the binary data to your app's local storage. Use platform-specific directories, such as the Application Documents directory on iOS or the AppData directory on Android. Store the file with the correct extension (.mp3, .wav, etc.) to ensure system media players recognize it.
Implement a caching strategy based on the input text hash to avoid duplicate storage. Since the API does not store generated audio, you are responsible for managing disk space. Regularly clean up old or unused audio files to prevent your app from consuming excessive storage on the user's device.
Consider using a local database to map text hashes to file paths. This allows you to retrieve previously generated audio quickly without re-downloading or re-generating it. This is particularly useful for frequently used phrases or menu options in your mobile app.
- Use platform-specific secure storage for sensitive user data if required.
- Implement a cleanup routine to remove unused audio files periodically.
- Store files with correct extensions to ensure compatibility with system media players.
Play in media player
Load the saved binary data or local file into your app's media player. Most mobile frameworks have built-in audio players that accept file paths or byte arrays. Initialize the player with the audio source and trigger playback. Ensure you handle playback states correctly, such as pause, resume, and stop, to provide a seamless user experience.
For immediate playback without saving to disk, pass the binary data directly to the audio decoder. This reduces latency but requires more memory management. Test playback across different device models and OS versions to ensure compatibility. Handle errors gracefully, such as unsupported audio formats or playback interruptions due to phone calls.
Provide user controls for volume and playback speed if your app supports it. The API supports speed adjustments between 0.25 and 4.0, which can be applied dynamically. This allows users to customize the listening experience, enhancing accessibility and engagement for your mobile application.
Monitor playback completion to trigger subsequent actions, such as loading the next audio chunk or updating the UI. This ensures smooth transitions between audio segments, especially when handling long texts that are split into multiple requests.
- Use platform-native media players for best compatibility and performance.
- Handle playback errors gracefully with user-friendly feedback messages.
- Support dynamic speed adjustments within the 0.25–4.0 range for user customization.
Handling Errors
Mobile apps often face unstable network conditions, making robust error handling essential for a smooth user experience. When the synthesis service is temporarily unavailable or the connection drops, your app should gracefully manage the interruption rather than crashing or hanging indefinitely. Proper error handling ensures that users are informed and can retry without losing their progress.
By anticipating common failure points like network issues or authentication problems, you can design a resilient integration that maintains trust. This section covers how to handle specific errors effectively, ensuring your app remains responsive even when the API is busy or credentials are invalid.
Network timeouts
Set a reasonable timeout (e.g., 10–15 seconds) for API requests. If the service doesn’t respond within this window, assume the request failed and notify the user. Avoid infinite waits, especially on mobile networks where latency can spike.
Implement retry logic with exponential backoff for transient network errors. This prevents overwhelming the server during temporary outages while ensuring the request eventually completes if the issue resolves quickly.
- Use a 10–15 second timeout for API calls.
- Implement exponential backoff for retries.
- Notify users of temporary failures with a clear message.
Authentication errors
If you receive a 401 or 403 error, your API key is likely invalid or expired. Double-check that the key is correctly formatted and sent in the Authorization: Bearer header. Ensure the key is active and hasn’t been revoked.
Re-authenticate by refreshing the key if necessary. Store keys securely in your app’s keychain or secure storage to prevent accidental exposure or corruption.
- Check for 401/403 status codes.
- Verify key format and expiration.
- Refresh keys if revoked or invalid.
Rate limit exceeded
The API allows 60 requests per minute per key (10 before the first top-up). If you exceed this limit, you’ll receive a 429 error. Implement a queue or delay mechanism to throttle requests and avoid hitting the limit too quickly.
Monitor your usage dashboard to stay within limits. If you anticipate high traffic, consider distributing requests across multiple keys.
- Respect the 60 requests/minute limit.
- Implement request throttling or queuing.
- Monitor usage to avoid limits.
Long Text Strategy
Mobile apps often need to read longer articles or book excerpts, but the API limits each request to 4,000 characters. You must split your input text into smaller segments before sending them to the endpoint.
Process each segment individually to stay within the character limit. Once you receive the audio file for each chunk, concatenate them in the correct order to create a seamless listening experience for the user.
Split text into chunks
Break your input string into parts of up to 4096 characters. Ensure you split at word boundaries to avoid cutting off mid-word, which preserves natural speech flow.
- Limit each chunk to 4096 characters
- Split at natural word boundaries
- Preserve spacing between chunks
Fetch each chunk
Send a POST request for each chunk using the same API key. The API processes requests sequentially, so under load, later chunks may wait in a queue.
Concatenate audio files
Receive the binary audio data for each chunk. Combine these files in order using a library like FFmpeg or your mobile OS’s media framework to play a single continuous track.
Optimizing Performance
Mobile apps often repeat common phrases like "Level Complete" or "Game Over." Storing these audio files locally eliminates redundant API calls and reduces latency, ensuring instant playback. This approach keeps your API key usage low and saves credits for dynamic content.
For larger projects, pre-generating audio during app updates or idle times ensures content is ready when needed. This strategy works well for static menus or tutorial steps, removing the wait time during active gameplay.
Cache frequent phrases
Store generated audio in the device's local storage. Check for existing files before making a network request. This reduces data usage and speeds up response times significantly for repetitive UI elements.
Use a simple hash of the text and voice as the filename to avoid duplicate storage.
- Check local storage before API call
- Use text+voice hash as filename
- Clear cache on app updates
Pre-generate audio
Generate audio files during app initialization or when the device is charging and connected to Wi-Fi. This ensures that static content, such as tutorial text or menu options, is available instantly without network dependency.
This is especially useful for languages or voices that might have slightly longer generation times, ensuring a smooth user experience.
- Generate during idle time
- Store in app bundle or local DB
- Ideal for static content
Use background threads
Never block the main UI thread while waiting for the API response. Use background threads or async tasks to handle network requests and audio decoding. This prevents the app from appearing frozen or unresponsive.
Ensure that audio playback is synchronized with the UI state to avoid conflicts when the user navigates away quickly.
- Use async/await patterns
- Avoid blocking UI thread
- Handle configuration changes gracefully

Audio Format Choice
Choosing the right audio format balances file size, quality, and compatibility. Our API supports mp3, wav, opus, flac, and pcm, letting you pick what fits your app’s needs.
MP3 for small size
MP3 is the go-to for most mobile apps. It offers a good balance between file size and audio quality, keeping your app’s storage footprint low while delivering clear speech.
- Smallest file sizes among lossy formats
- Universal support across iOS and Android
WAV for high quality
If you need uncompressed audio for editing or high-fidelity playback, WAV is the way to go. It preserves the full audio data without compression artifacts.
- Uncompressed, lossless quality
- Larger file sizes
Opus for mobile efficiency
Opus is optimized for mobile efficiency. It delivers high-quality audio at lower bitrates, making it ideal for apps where bandwidth and battery life are concerns.
- High quality at low bitrates
- Ideal for variable network conditions
Language Detection
Language handling in your mobile app is straightforward. The API guesses the language from the text script by default, so Latin text defaults to English. For non-English Latin text, you must set the language field explicitly to ensure accurate synthesis.
This approach saves you from managing complex locale detection logic on the device. Simply pass the ISO code alongside your text payload for precise control over the output voice.
Auto-detect from script ['The API automatically infers the language from the script used in your input text. For example, Latin characters default to English, while Cyrillic or Han characters trigger the respective language models. This works seamlessly for single-language content without additional configuration.', 'Bullets']
Explicit language code ['You can override the auto-detection by providing an optional language field in the JSON body. Pass the ISO 639-1 code (e.g., "es" for Spanish) to ensure the correct voice is used, even if the text contains ambiguous characters or mixed scripts.', 'Bullets']
Handle mixed languages ['While the API supports 23 languages, it processes each request as a single language. For mixed-language phrases, consider splitting the text or setting the dominant language code. The system does not automatically switch voices mid-sentence, so explicit control ensures consistent audio quality.', 'Bullets']
User Experience
Voice synthesis feels instant, but network latency varies. Users need clear feedback so they know audio is generating. Avoid generic spinners; show specific progress if possible. Since short phrases take a few seconds, a quick fade-in works better than a static loader.
Playback failures happen. Network drops or codec issues interrupt listening. Inform users simply when audio fails to load. Allow them to retry without losing context. A clear error message respects their time.
Mobile OS handles volume independently. Your app’s UI volume slider should adjust the system volume, not just a local overlay. This ensures consistency with other media. Test on iOS and Android to verify behavior.
Show loading states
Voice synthesis feels instant, but network latency varies. Users need clear feedback so they know audio is generating. Avoid generic spinners; show specific progress if possible. Since short phrases take a few seconds, a quick fade-in works better than a static loader.
Playback failures happen. Network drops or codec issues interrupt listening. Inform users simply when audio fails to load. Allow them to retry without losing context. A clear error message respects their time.
- Use a subtle animation during the 2-5 second generation window
- Display a clear 'Generating...' message to set expectations
- Allow cancellation if the user navigates away quickly
Handle playback errors
Network drops or codec issues interrupt listening. Inform users simply when audio fails to load. Allow them to retry without losing context. A clear error message respects their time.
Ensure your media player handles unsupported formats gracefully. If Opus fails, fallback to MP3. This reduces friction during playback.
- Show a 'Retry' button for failed requests
- Display a concise error message, e.g., 'Audio unavailable'
- Log errors for debugging without alarming the user
Allow volume control
Mobile OS handles volume independently. Your app’s UI volume slider should adjust the system volume, not just a local overlay. This ensures consistency with other media. Test on iOS and Android to verify behavior.
Integrate with the device’s hardware volume keys. This provides a native feel. Users expect physical controls to work seamlessly with your TTS feature.
- Sync UI slider with system volume
- Support hardware volume keys
- Maintain volume settings across app sessions
Testing Integration
Testing ensures your mobile app correctly handles audio synthesis without blocking the user interface. By using standard sample texts and verifying the binary response, you confirm that your integration logic matches the API's requirements before scaling to production volumes.
Focus on verifying that the audio files are valid and that the app handles edge cases like network timeouts or rate limits gracefully. This step prevents silent failures in production where users might experience muted speech or stuck loading states.
Use sample text
Start with short, diverse phrases to verify basic functionality. Use the provided curl example in your documentation to generate a quick test file locally before embedding it in your app code.
Test edge cases like empty strings or maximum length inputs (4096 characters) to ensure your parser handles boundary conditions without crashing.
- Try all 8 voice presets to check tone consistency.
- Test with mixed-language text to verify auto-detection.
- Use the free $0.50 trial credit for initial tests.
Verify audio output
Download the returned binary data and play it in a standard media player to confirm format validity (mp3, wav, opus, etc.). Ensure the audio is not corrupted and matches the expected voice preset.
Check that the inaudible watermark is present if required for your compliance needs, though this is transparent to the user.
- Validate file headers match the requested
response_format. - Ensure volume levels are consistent across voices.
Check latency
Measure the time from request submission to audio playback. Expect roughly real-time speed (25 characters per second) for long texts, but note that short phrases may take a few seconds due to processing queues.
Monitor this metric under load to ensure your app's UI remains responsive while waiting for the audio file to arrive.
- Record start-to-end time for 100-character samples.
- Test under different network conditions (3G/4G/Wi-Fi).
Production Readiness
As your mobile app grows, tracking character consumption becomes essential for budget control. The dashboard provides real-time visibility into usage, allowing you to verify that costs align with your user activity without surprise charges.
Setting up alerts ensures you never run out of credit mid-generation. Since the API bills per character, monitoring usage trends helps you top up via USDT before requests fail due to insufficient balance.
Monitor usage
The API returns usage metadata for every request, which you can log to track character counts. This data helps you estimate costs accurately and identify unusual spikes in voice generation activity.
Visualize consumption patterns directly from the dashboard to plan your USDT top-ups effectively.
- Track characters generated per user session
- Identify peak usage times for better resource planning
- Verify billing accuracy against dashboard data
Set up alerts
While the API does not offer built-in push notifications, you can implement client-side checks. Fetch the balance endpoint periodically and trigger an in-app warning when credit falls below a safe threshold.
This proactive approach prevents sudden playback failures during critical user interactions, such as reading a long story or navigating a menu.
- Check balance before critical voice actions
- Warn users when credits are low
- Prevent abrupt service interruptions
Scale key management
Since each account holds only one active key, consider generating new keys if you suspect leakage or need to rotate credentials. Revoking a key instantly invalidates the old one, ensuring security without downtime.
For larger deployments, you might manage multiple accounts to distribute the 60 requests-per-minute limit, ensuring smooth performance even during high-demand periods.
- Rotate keys instantly upon revocation
- Distribute load across multiple accounts if needed
- Keep key storage secure in your app
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Pricing clarity matters for indie devs who need to forecast costs without hidden surprises.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- ISO 639 language codes
- MDN: Web Speech API
- LibriTTS-R corpus (OpenSLR 141)
- OpenAI API reference: create speech
- openai-python on GitHub
- Tether (USDT)
- TRON developer hub: TRC-20
- Python documentation
- W3C WAI: making audio and video accessible
- Creative Commons Attribution 4.0
- LibriVox public-domain audiobooks
