Frequently asked questions
How do I install the SDK?
Use the official OpenAI SDK, as the API shares the same request shape. Install the library via your package manager (e.g., pip or npm). Configure the client by setting the base_url to https://api.man79ok.com/v1 and providing your Bearer token in the Authorization header. This allows immediate integration without learning a new proprietary client structure.
What is the base URL?
The base URL is https://api.man79ok.com/v1. Configure your SDK client to point to this endpoint. All requests, including speech synthesis and voice listing, route through this domain. Ensure your Authorization header uses a valid Bearer token starting with 'tts-'. This URL structure mirrors the OpenAI API format for compatibility.
How do I handle errors in Python?
Wrap your API calls in try-except blocks to catch standard HTTP or SDK exceptions. Failed requests are free, so no charge occurs if synthesis fails. Check the response status code to distinguish between network issues and API errors. Log the error details for debugging, ensuring your application can retry or notify the user appropriately.
Can I use Node.js with this API?
Yes, use the official OpenAI Node.js SDK. Set the base_url to https://api.man79ok.com/v1 and inject your API key. The request body structure matches the OpenAI specification, so existing code works with minimal changes. This ensures reliable integration for server-side voice generation without requiring a custom Node-specific library.
How do I split long texts?
Split input text into chunks of up to 4096 characters. Send each chunk as a separate POST request to the speech endpoint. Receive the resulting audio files and join them sequentially. This approach ensures compliance with the character limit while maintaining audio continuity for longer narratives or documents.
Is caching recommended?
Caching is not explicitly mentioned as a built-in feature, but you can cache generated audio files locally if the input text remains static. Since requests are processed sequentially, caching reduces redundant API calls and associated costs. However, dynamic content requires fresh generation. Implement your own caching layer based on text hash and voice selection.
How do I monitor usage?
Check your account dashboard at /get-api-key/ to view balance, characters used, and trial status. Request metadata (time, characters, status) is kept for billing. Monitor your remaining characters to avoid service interruption. The dashboard provides real-time data on your consumption, helping you manage your budget effectively without needing external tracking tools.
What are common rate limit errors?
The limit is 60 requests per minute per key (10 per minute before the first top-up). Exceeding this triggers rate limit errors. Implement exponential backoff in your client to handle retries gracefully. New keys start with the lower limit until a top-up is processed. Monitor your request frequency to stay within these bounds.
How do I secure my API key?
Store your Bearer token securely, such as in environment variables or a secrets manager. One active key exists per account; issuing a new key immediately invalidates the old one. Rotate keys periodically or if compromised. Do not expose the key in client-side code or public repositories, as it grants full access to your account.
Can I use this for live broadcasts?
Yes, but consider latency. Requests are processed sequentially, so under load, a request may wait in a queue. Typical speed is roughly real time (25 characters per second). For live use, pre-generate audio files or ensure sufficient queue capacity. The API does not support streaming, so you must wait for the full file before broadcasting.
How do I test voice quality?
Use the free trial credit ($0.50) to generate short samples with each of the eight voices. Test different speeds and formats to evaluate clarity. The voices are based on licensed recordings, offering distinct tones like warm narration or energetic promo. Use the /v1/voices endpoint to list available options and their characteristics before production use.
What is the best speed setting?
Speed ranges from 0.25 to 4.0. Optimal settings depend on content type and listener preference. Slower speeds suit storytelling, while faster speeds work for quick updates. Test with your specific text to find the optimal balance between clarity and pacing. Note that requests are processed sequentially, so under load, generation may wait in a queue, affecting perceived speed.
How do I handle network drops?
Implement retry logic with exponential backoff in your client. Since failed requests are free, retrying does not incur extra costs if the initial attempt failed. Ensure your code handles partial responses or timeouts gracefully. Use the SDK’s built-in retry mechanisms if available, or write custom handlers to manage connection instability.
Is there a Python library?
Yes, use the official OpenAI Python library. It is compatible because the API shares the same request shape. Install it via pip and configure the base_url to https://api.man79ok.com/v1. This allows you to use standard Python SDK methods for speech synthesis, leveraging existing documentation and community support for seamless integration.
Getting Started
EchoNode provides a robust text-to-speech API optimized for integration into voice assistants and conversational agents. We focus on reliable, low-latency audio generation with transparent pricing and simple SDK compatibility for indie developers.
Account creation
Sign up at /get-api-key/ using your Google account or email. Google sign-ins receive a $0.50 trial credit valid for 7 days, while email-based accounts start with zero balance. Accounts are specific to man79ok.com.
- Google sign-up includes $0.50 trial credit
- Email sign-up starts with $0 balance
- No minimum spend or monthly plans
API key generation
Your API key appears immediately after registration. Use it with the Authorization: Bearer header. You can generate a new key at any time; the old one stops instantly.
Environment setup
Set your environment variable TTS_API_KEY to your key. Configure the base URL to https://api.man79ok.com/v1. Ensure your SDK client points to this endpoint for compatibility with the OpenAI SDK format.
- Base URL: https://api.man79ok.com/v1
- Auth header: Bearer <key>
- SDK: OpenAI SDK compatible
SDK Configuration
The EchoNode API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing OpenAI SDKs with minimal configuration changes. This compatibility ensures a smooth transition for developers already familiar with the OpenAI ecosystem, requiring only a base URL adjustment and custom authentication headers.
By leveraging the official OpenAI SDK, you avoid writing custom HTTP clients for basic operations. The SDK handles JSON serialization and response parsing, letting you focus on integrating voice synthesis into your voice assistant or chatbot workflow without managing raw request details.
OpenAI SDK installation
Install the standard OpenAI Python package using your preferred package manager. This provides the core client library required to interact with the EchoNode endpoint seamlessly.
- pip install openai
Base URL configuration
Point the SDK’s base URL to the EchoNode API domain. This redirects all requests to the correct server while maintaining the standard /v1/audio/speech path structure.
- base_url="https://api.man79ok.com/v1"
Authentication headers
Pass your unique API key via the Authorization header. The SDK expects a Bearer token format, which you can configure directly in the client initialization.
- Authorization: Bearer tts-<your_key>
Making Your First Request
Initiate synthesis by sending a POST request to https://api.man79ok.com/v1/audio/speech. The endpoint accepts JSON payloads containing the model, input text, voice preset, and output format. Authentication requires a Bearer token in the Authorization header.
Curl command example
Use curl to test the endpoint directly from the terminal. Replace YOUR_API_KEY with your generated key. The command sends a simple greeting to the tts-1 model and saves the resulting MP3 file.
- Request: POST /v1/audio/speech
- Header: Authorization: Bearer tts-...
- Body: {"model": "tts-1", "voice": "nova", "input": "Hello world", "response_format": "mp3"}
Python code snippet
The OpenAI Python SDK works seamlessly by pointing base_url to the EchoNode API. Initialize the client with your key and the custom base URL. Call client.audio.speech.create() with your parameters.
- Install: pip install openai
- Set base_url to https://api.man79ok.com/v1
- Use standard create() method
Response parsing
The API returns binary audio data directly in the response body. No JSON wrapper contains the audio; it is the raw byte stream. Write these bytes to a file or feed them into your audio player buffer.
Voice Selection
Selecting the appropriate voice preset determines the user experience for your voice assistant. Choose from eight distinct presets, such as aria for clear narration or atlas for neutral news delivery, based on your application's tone. Each voice supports all 23 available languages, allowing consistent audio generation regardless of the input language.
Choosing the right voice
Match the voice to your use case. Use felix for energetic promos, milo for conversational agents, or orion for deep, documentary-style content. The model parameter (tts-1 or tts-1-hd) affects audio fidelity but not the voice selection logic, as both engines support all presets equally.
- aria: warm, clear narrator
- nova: bright, upbeat
- luna: soft, storytelling
- sage: calm, instructional
- felix: energetic, promo
- milo: friendly, conversational
- atlas: neutral, news
- orion: deep, documentary
Testing voice quality
Generate short test strings (under 4096 characters) using the /v1/audio/speech endpoint. Compare mp3 and wav outputs to verify latency and clarity. Note that generation takes roughly real-time duration; longer texts will queue, so test with representative loads to gauge wait times before production deployment.
Language code specification
The API guesses the language from the script (Latin defaults to English). For non-English Latin-script text, explicitly set the language parameter (e.g., de for German, es for Spanish) to ensure correct pronunciation. Supported languages include Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Unsupported languages like Vietnamese or Thai will likely default to English pronunciation.
- Set
languagefor non-English Latin text - Defaults to English for Latin scripts
- Check /v1/voices for full list
Handling Long Texts
The API enforces a strict 4,096-character limit per request. To handle longer narratives, split the input text into chunks that respect this boundary. Ensure splitting occurs at logical sentence or paragraph boundaries to avoid jarring audio transitions.
Text splitting logic
Divide the source text into segments of up to 4,096 characters. Each segment becomes a separate API call. This ensures compliance with the request schema while preserving semantic coherence.
Audio concatenation
Collect the audio files returned from each synthesis request. Merge them sequentially into a single output file. Use standard audio libraries to join the formats (mp3, wav, opus, flac, or pcm) without re-encoding, ensuring seamless playback.
Memory management
Stream audio data if possible to avoid loading entire files into RAM. For batch processing, process chunks sequentially to maintain low memory usage. This approach keeps resource consumption predictable during long text generation.
Error Handling
Robust error handling ensures your voice assistant remains responsive even when the API experiences transient issues or rate limits. Properly managing these edge cases prevents silent failures and maintains a smooth user experience during peak usage periods.
By implementing exponential backoff and validating inputs upfront, you minimize wasted requests and reduce latency. This approach keeps your application stable while adhering to the strict 60 requests per minute limit per key.
Rate limit retries
The API enforces a limit of 60 requests per minute per key. If you exceed this, you receive a 429 status code. Implement exponential backoff to retry automatically, respecting the Retry-After header if provided.
Before the first top-up, the limit is 10 requests per minute. Adjust your retry logic to account for this stricter initial constraint to avoid unnecessary retries during the trial phase.
- Check for HTTP 429 status codes
- Implement exponential backoff with jitter
- Respect
Retry-Afterheaders
Network error handling
Network interruptions can occur during audio generation. Catch connection timeouts and retry the request up to three times. Since requests are processed sequentially, brief delays may occur during high load, so allow for reasonable timeout thresholds.
Failed synthesis requests are free, so retrying on network errors does not incur extra costs if the retry fails. However, ensure your client handles partial responses gracefully to avoid corrupt audio files.
- Retry on 5xx server errors
- Handle connection timeouts gracefully
- Validate partial responses
Invalid input handling
Validate text length before sending. The API accepts up to 4096 characters per request. If your text exceeds this, split it manually and concatenate the audio files server-side or client-side. Passing oversized text results in a 400 error.
Ensure the voice parameter matches one of the 8 presets and response_format is one of the supported formats. Invalid parameters return a 400 error with a descriptive message. Always check the error response body for specific details.
- Validate character count (< 4096)
- Verify voice and format enums
- Parse error response bodies
Performance Optimization
Optimizing your TTS integration ensures consistent latency and cost efficiency. Since requests are processed sequentially, strategic caching and batching can significantly reduce redundant API calls and queue wait times.
Caching responses
Cache audio files for static or frequently repeated text segments. Since generated audio is not stored server-side, local caching prevents re-synthesis of identical inputs, saving both time and character credits.
- Store hashed text inputs with their corresponding audio blobs.
- Invalidate cache only when text content or parameters change.
- Avoid caching dynamic user-specific segments to save memory.
Batch processing
Split long texts into chunks of 4096 characters and process them in sequence. This approach respects the API’s character limit while maintaining narrative flow through audio concatenation.
Pre-splitting text before submission reduces per-request overhead and ensures consistent processing order.
- Use the 4096-character limit as your maximum chunk size.
- Concatenate resulting audio files sequentially for final playback.
- Monitor queue depth during high-load periods to predict wait times.
Latency reduction
Typical generation speed is roughly real-time (about 25 characters of text per second of generation). For short phrases, expect a few seconds of delay. Pre-generate audio for known phrases to reduce runtime latency.
Ensure your client handles the 60 requests-per-minute rate limit gracefully by implementing exponential backoff rather than parallel bursts.
- Pre-generate static phrases to bypass generation time.
- Implement exponential backoff for rate limit retries.
- Monitor queue status to predict wait times accurately.

Monitoring Usage
Track character consumption and request status via the dashboard. Each request consumes credits proportional to input length, with failed requests refunded automatically. Monitor the remaining balance to prevent service interruption during high-volume voice assistant operations.
Usage tracking
Log every API call’s character count and status code. Since the API returns audio directly, track the input length against your billing tier ($0.01 per 1,000 characters). Use the response headers or dashboard to verify successful synthesis before caching or playing the audio.
- Record timestamp, character count, and voice ID for each request.
- Flag failed requests immediately, as they are free but still count against your rate limit history.
Cost monitoring
Calculate costs based on the character count per request. Split long texts into chunks to keep individual requests under the limit, ensuring predictable billing. Since balance does not expire, monitor usage trends to plan USDT top-ups on the TRON network efficiently.
- Multiply total characters by $0.00001 to estimate exact costs.
- Set up alerts at 20% and 80% balance depletion to avoid unexpected service stops.
Error logging
Log HTTP status codes and error messages for debugging. Distinguish between rate limits (429), invalid inputs, and network timeouts. Store these logs locally or in your preferred monitoring service to identify patterns, such as repeated failures with a specific voice or language code.
- Capture
model,voice, andinputlength in error logs. - Retry logic should handle 429 errors with exponential backoff, respecting the 60 requests per minute limit.
Security Best Practices
Securing your API key and managing request limits are critical for maintaining reliable voice assistant operations. Proper storage prevents unauthorized usage, while client-side rate limiting ensures you stay within the 60 requests per minute quota without unnecessary backend retries.
Key storage best practices
Store your Bearer token in environment variables or a secure vault, never in client-side code or version control. Since a new key invalidates the old one immediately, rotate keys via the dashboard if a leak is suspected to instantly revoke access.
- Use environment variables for server-side keys
- Rotate keys immediately upon suspected compromise
- Avoid hardcoding keys in source control
Rate limiting implementation
Implement client-side rate limiting to stay within the 60 requests per minute limit per key. Your voice assistant should queue synthesis requests if the limit is approaching, preventing wasted credits on failed attempts due to throttling.
- Monitor the 60 req/min limit
- Queue requests to avoid throttling
- Handle 429 errors gracefully
Data privacy considerations
Input text is used solely for audio generation and is not used for training models. Generated audio is returned in the response and not stored persistently, ensuring that sensitive voice data remains transient unless your application caches it.
- Text is not used for training
- Audio is not stored by the API
- Metadata kept for billing only
Deployment
Deploying the EchoNode API requires configuring your infrastructure to handle the 60 requests per minute limit per key efficiently. Since requests are processed sequentially, ensure your application logic respects these limits to avoid queuing delays. Store your API key securely using environment variables or a secrets manager, never hardcoding it in source control.
Production environment setup
Initialize your production environment with the API base URL and key. Use the OpenAI SDK by setting the base_url to https://api.man79ok.com/v1. Ensure your application handles the Authorization: Bearer header correctly for all requests. Validate that your network allows outbound HTTPS traffic to the API endpoint without restrictive firewalls blocking the connection.
- Set
base_urltohttps://api.man79ok.com/v1 - Store keys in environment variables
- Verify outbound HTTPS connectivity
Load balancing
Using multiple keys can help distribute traffic more evenly across your account’s quota. Rotate keys in your application logic to prevent any single key from hitting the 60 requests per minute limit prematurely. This approach minimizes queuing time for subsequent requests and ensures consistent audio generation latency during peak usage periods.
- Rotate keys to distribute load
- Prevent single-key throttling
- Minimize queuing latency
Scaling strategies
Scale your application by adding more API keys as your user base grows. Since there are no minimum spends or monthly plans, you can increase capacity linearly with your needs. Implement client-side caching for repeated text inputs to reduce API calls and costs. Monitor usage regularly to adjust key rotation strategies based on actual traffic patterns.
- Add keys linearly with demand
- Implement client-side caching
- Monitor usage patterns
Troubleshooting
When integrating EchoNode, developers often encounter predictable hurdles related to rate limits, input constraints, and audio generation nuances. This guide addresses the most frequent issues to help you maintain smooth voice assistant operations.
We cover common HTTP errors, audio quality variations across voices, and language detection edge cases. Understanding these limits ensures your bot delivers consistent, high-quality speech without unexpected downtime.
Common API errors
Rate limiting is the most frequent issue. The API allows 60 requests per minute per key (10 before the first top-up). Exceeding this returns a 429 status. Implement exponential backoff in your retry logic to handle queue delays during high load.
Invalid inputs, such as text exceeding 4096 characters or unsupported response formats, trigger 400 errors. Always validate input length before sending requests. Failed synthesis refunds the character count, so retrying after fixing the input is cost-free.
- 429: Rate limit exceeded; wait and retry with backoff.
- 400: Invalid input; check character count (<4096) and format.
- 401: Invalid or expired API key; regenerate via /get-api-key/.
Audio quality issues
Audio quality is consistent but varies by voice preset. 'aria' offers a clear narrator tone, while 'nova' is brighter. If audio sounds robotic, try switching voices or adjusting the speed parameter (0.25–4.0) to better match the text’s pacing.
Note that generated files contain an inaudible watermark. This does not affect playback quality but confirms the file is synthetic. Short phrases may take a few seconds to generate; long texts process at roughly real-time speed (25 chars/sec).
- Switch voices if tone doesn't match your use case.
- Adjust speed (0.25–4.0) for better text pacing.
- Expect slight delays for short phrases due to processing time.
Language detection failures
If the language field is omitted, the API guesses the language based on the script. Latin script defaults to English. For non-English Latin text (e.g., Spanish or French), always set the language ISO code explicitly to avoid mispronunciation.
Unsupported languages like Vietnamese or Thai will default to English or fail. Ensure your input text matches one of the 23 supported languages. If detection fails, check for mixed scripts or unusual characters that confuse the parser.
- Always set
languagefor non-English Latin text. - Unsupported languages: Vietnamese, Indonesian, Thai, etc.
- Check for mixed scripts if pronunciation seems off.
Next Steps
After mastering the basics, leverage the language parameter to force specific dialects for non-English Latin scripts, ensuring consistent voice output across your global user base. Utilize the typical generation speed (about 25 characters per second) to estimate latency accurately for your voice assistant's conversational flow.
Advanced features
Explore the full range of 8 voices and 23 supported languages to match your brand’s identity. Use the speed parameter (0.25–4.0) to adjust pacing for different content types, from calm storytelling to energetic promotions.
- Test all 8 voice presets for tone suitability
- Experiment with
response_formatfor optimal file size vs. quality - Use
GET /v1/voicesto dynamically select voices at runtime
Community support
Join other indie developers integrating EchoNode. Share your implementation patterns and voice configurations to help the community optimize their conversational agents.
- Discuss integration challenges on developer forums
- Share custom text-splitting logic for long narratives
Documentation updates
Check the docs regularly for updates on supported languages and new voice presets. The API reference remains the single source of truth for request shapes and rate limits.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Cache audio files for static or frequently repeated text segments.
23 languages
Any voice speaks any of these languages.
