Frequently asked questions
Do I need to install a specific SDK?
No proprietary SDK is required. The API follows the OpenAI request shape, allowing you to use the official OpenAI SDKs by updating the base_url to https://api.do666ok.com/v1. Alternatively, you may use standard HTTP libraries to send POST requests with the appropriate JSON body and Bearer token authentication.
How do I change the base URL in the SDK?
Configure your SDK client to use https://api.do666ok.com/v1 as the base URL. This allows the official OpenAI SDKs to function correctly with our endpoint. Ensure your Authorization header includes your Bearer token, and verify that your model parameter is set to either tts-1 or tts-1-hd.
What is the best way to store API keys?
Store your API key securely in environment variables or a secrets manager within your application infrastructure. Each account holds one active key; issuing a new key immediately invalidates the previous one. Avoid hardcoding keys in client-side code or version control systems to prevent unauthorized usage of your balance.
Can I use this API in a mobile app?
Yes, the API is accessible via standard HTTP requests, making it suitable for mobile applications. You can integrate it using any HTTP library available on your target platform. Note that rate limits apply per key, so ensure your mobile app handles retries and respects the 60 requests per minute limit.
How do I handle long texts in the API?
Split input text into chunks of up to 4096 characters per request. Generate audio for each chunk individually, then join the resulting audio files. This approach ensures compatibility with the API constraints while allowing you to produce audio for longer narratives or lessons without truncation or data loss.
What is the difference between tts-1 and tts-1-hd?
Both models use the same engine and incur the same price of $10 per 1 million characters. Both models use the same engine and incur the same price of $10 per 1 million characters. Choose based on your specific latency or quality requirements for your language learning application.
How do I detect errors in the response?
Monitor HTTP status codes and response bodies for error details. Failed requests result in a full refund of the character count. Check for standard HTTP error codes such as 400 for bad requests or 429 for rate limits. Implement logging to track request metadata, including time, characters, and status, for billing verification.
Is the API suitable for real-time applications?
The API is not designed for real-time streaming or WebSocket connections. Requests are processed sequentially, meaning under load, a request may wait in a queue. Typical speed is roughly real-time for long texts, but short phrases may take a few seconds. Plan for asynchronous generation in your application workflow.
How do I calculate the cost of a request?
Cost is calculated at $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count as characters. Failed requests are free. Multiply the total character count of your input text by 0.00001 to determine the exact cost for a specific synthesis request.
Can I use the same key for multiple projects?
Yes, a single API key can be used across multiple projects or applications. However, the rate limit of 60 requests per minute applies to the key itself, not per project. If multiple projects share a key, they collectively consume the rate limit, which may affect performance under high load.
How do I rotate my API key without downtime?
Issue a new API key from your account dashboard. The new key becomes active immediately, and the old key stops working at once. Update your applications to use the new key. Ensure your deployment process handles the key switch smoothly to avoid any interruption in audio generation services.
What happens if I exceed the rate limit?
Requests will be rejected with a 429 status code. The standard limit is 60 requests per minute per key, or 10 per minute before the first top-up. Implement exponential backoff in your client to retry requests after the rate limit window resets. Monitor your usage to stay within limits.
Is there a limit on concurrent requests?
Requests are processed one after another, so there is an implicit limit based on the queue and rate limits. Under load, requests may wait in a queue. Ensure your application handles potential delays gracefully. There is no explicit concurrency limit, but sequential processing affects throughput during high demand periods.
How do I support multiple languages in one app?
Specify the language using the optional ISO code in the request body. If not set, the language is guessed from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language parameter to ensure accurate synthesis across the 23 supported languages.
Can I generate audio in the background?
Yes, generate audio asynchronously by sending POST requests and handling the response when ready. Since requests are processed sequentially, background generation may experience delays under load. Store the resulting audio files or URLs for later playback. This approach fits well with language learning apps where audio is not needed instantly.
What is the latency for generating audio?
Typical speed is roughly real-time for long texts, approximately 25 characters per second of generation. Short phrases may take a few seconds. Requests are processed sequentially, so latency increases under load due to queuing. Plan your application’s user experience accordingly, especially for interactive language learning exercises.
How do I handle audio playback errors?
Handle playback errors by checking the audio format and ensuring the client supports the returned format (mp3, wav, opus, flac, pcm). If the API returns an error, retry the request or check for rate limits. Log errors for debugging. Ensure your app handles network issues gracefully during audio retrieval.
Can I use this API for commercial projects?
Yes, the API is available for commercial use. Generated audio files carry an inaudible watermark marking them as synthetic speech. Input text is not used for training. You may use the generated audio in your language learning applications.
Is the data used for training the model?
No, input text is used only to produce the audio and is not used for training. Generated audio is returned in the response and not stored. Request metadata (time, characters, status) is kept for billing purposes. Your data remains private and is not repurposed for model improvement.
Pre-Integration Setup
To begin integration, create an account at https://do666ok.com/get-api-key/ using Google or email. This establishes your unique environment for generating speech assets for language learning modules.
Account Creation and Verification
Register via the /get-api-key/ page. Accounts are site-specific, ensuring isolated billing and usage tracking for your indie development project.
API Key Acquisition
Upon registration, retrieve your Bearer key from the dashboard. This key authenticates all POST requests to https://api.do666ok.com/v1/audio/speech.
Trial Credit Activation
Google sign-ins receive $0.50 trial credit (approx. 50,000 characters) valid for 7 days. Email-based accounts start with zero balance.
- Credit expires after 7 days
- Email accounts start without trial
- Immediate key activation
SDK Configuration
To integrate the EchoLingua API, install the OpenAI SDK (or any HTTP library) using your preferred package manager. This library handles the underlying HTTP requests and JSON serialization, allowing you to leverage standard client methods for speech synthesis.
Installing the OpenAI SDK
Install the openai Python package or the equivalent for your language. Ensure you are using a version compatible with the base_url override feature, which is essential for redirecting traffic to the EchoLingua infrastructure.
- Use
pip install openaifor Python environments. - Verify installation with
python -c "import openai; print(openai.__version__)".
Setting the Base URL
Configure the client to point to https://api.do666ok.com/v1. This ensures all requests are routed to the correct EchoLingua endpoint while maintaining compatibility with the OpenAI speech endpoint schema. The model parameter must be set to tts-1 or tts-1-hd.
- Base URL:
https://api.do666ok.com/v1 - Endpoint:
/v1/audio/speech - Method:
POST
Configuring Authentication Headers
Pass your unique API key via the Authorization: Bearer <key> header. Retrieve this key from the /get-api-key/ dashboard after signing in with Google or email. The SDK typically handles header injection automatically when the key is provided in the client initialization.
- Header format:
Authorization: Bearer tts-... - Key scope: One active key per account.
- New keys invalidate old ones immediately.
Request Construction
Constructing the API request requires precise definition of the voice and response_format parameters to ensure the output matches your language learning application's requirements. The API accepts eight specific voice presets, each optimized for distinct narrative styles, alongside support for all 23 listed languages.
Defining Voice Parameters
Select a voice from the eight available presets, such as aria for clear narration or atlas for neutral news-style delivery. You may optionally specify the language parameter using an ISO code (e.g., de for German) to prevent incorrect language guessing for Latin-script text. Each voice supports all 23 languages, allowing flexible voice selection regardless of target language.
- Voice presets: aria, nova, luna, sage, felix, milo, atlas, orion
- Optional
languageparameter for explicit ISO code specification - All voices support all 23 listed languages
Setting Response Formats
Specify the response_format as mp3, wav, opus, flac, or pcm based on your application's audio player capabilities. MP3 and Opus are recommended for efficient bandwidth usage in mobile language learning apps, while WAV and FLAC provide uncompressed quality for offline distribution.
- Available formats: mp3, wav, opus, flac, pcm
- MP3/Opus for bandwidth efficiency; WAV/FLAC for uncompressed quality
Handling Input Text Encoding
Ensure your input text is properly encoded in UTF-8 before sending the input field in the JSON body. The API accepts up to 4096 characters per request, counting spaces and punctuation. For longer texts, split the content into chunks of this limit and join the resulting audio files sequentially.
- UTF-8 encoding required for the
inputfield - Maximum 4096 characters per request (including spaces and punctuation)
- Split longer texts into chunks and join audio files
Audio Processing
The API returns binary audio data, requiring your application to handle raw bytes rather than parsing JSON structures for the audio content itself. Ensure your HTTP client is configured to handle the response body directly to a file or memory buffer.
Properly managing the binary stream is critical for maintaining the integrity of the generated speech files, especially when dealing with variable formats like MP3 or WAV.
Parsing Binary Responses
Configure your SDK to handle binary payloads by setting the appropriate response type. The API returns the audio file directly in the response body, allowing you to write bytes to a buffer without intermediate serialization overhead. This approach ensures that the audio data remains intact regardless of the selected response_format.
Be aware that failed requests return an error JSON object instead of audio bytes. Your code must distinguish between a successful binary stream and a JSON error response to prevent corruption in your local storage.
- Set response type to binary or stream
- Handle both audio bytes and error JSON objects
- Verify content-type header matches the requested format
Storing Audio Files Locally
Store the received audio files in a local directory or object storage with a naming convention that includes the voice ID, language, and timestamp. This facilitates easy retrieval for playback in your language learning application. Since generated audio is not stored by the API, you are responsible for all local storage management.
Implement a cleanup strategy for cached files to manage disk space, especially if your application generates audio dynamically for many users. The API does not retain the audio, so local storage is your only copy.
- Use unique filenames including voice and language codes
- Implement a cleanup strategy for cached files
- Verify file integrity after writing to disk
Streaming Audio to Players
While the API does not support WebSocket streaming, you can play the audio file by piping the binary response directly to an HTML5 audio element or a native media player. This allows for immediate playback without waiting for the entire file to download, provided your client supports progressive loading.
Note that the API processes requests sequentially, so under load, the initial bytes may have a slight delay. Ensure your player handles buffering appropriately to avoid playback stuttering during the initial connection phase.
- Pipe binary response to HTML5 audio element
- Handle buffering for progressive loading
- Account for sequential processing delays
Error Management
Effective error management ensures consistent audio delivery for language learners. The API enforces a rate limit of 60 requests per minute per key, dropping to 10 per minute for new accounts before the first top-up. Exceeding these limits returns a 429 status code, requiring immediate backoff.
Failed synthesis requests incur no charge, preserving your character credit. Proper handling of these errors prevents unnecessary billing disputes and maintains application stability during high-volume educational sessions.
Handling Rate Limits
The API allows 60 requests per minute per key. New accounts start with a limit of 10 requests per minute until the first top-up is processed. Monitor the Retry-After header in 429 responses to determine the optimal wait time before resuming requests.
- Limit: 60 req/min after top-up, 10 req/min initially.
- Use exponential backoff for 429 responses.
Retrying Failed Requests
If synthesis fails, the request is free. Implement logic to retry failed requests once after a short delay. Do not retry permanently, as persistent failures may indicate invalid voice or format parameters.
- Failed requests are free.
- Retry once on transient errors.
Logging Usage Statistics
Log request metadata including timestamp, character count, and status code. This data supports debugging and helps predict future capacity needs. The API does not store generated audio, so local logging is essential for audit trails.
- Log timestamps and character counts.
- Track status codes for debugging.
Optimization Strategies
Optimizing audio generation for language learning requires minimizing latency and reducing redundant API calls. By caching generated audio files and batching requests, you can significantly lower costs and improve the user experience during lesson playback.
Pre-generating content allows you to decouple audio production from user interaction, ensuring instant playback. These strategies handle the character limits and queue delays inherent in the TTS pipeline without disrupting the learning flow.
Caching Generated Audio
Store generated MP3 or WAV files locally or in a CDN. Since the input text is deterministic for a given voice, speed, and format, you can reuse audio files for identical phrases, eliminating redundant API calls.
Cache keys should include the voice ID, speed, and text. This ensures that changes in parameters generate a new file rather than serving an incorrect cached version.
- Cache keys must include voice, speed, and exact text
- Use CDNs for global low-latency delivery
- Invalidate cache only when text or parameters change
Batching Requests
Split long texts into chunks of up to 4096 characters and send them sequentially. This avoids exceeding the single-request character limit while maintaining a coherent audio stream.
Combine multiple short phrases into a single request where possible to reduce overhead. However, note that requests are processed one after another, so large batches may increase total generation time.
Monitor the rate limit of 60 requests per minute per key to avoid throttling during high-volume lesson loads.
- Max 4096 characters per request
- Requests are processed sequentially
- Monitor 60 requests/minute limit
Pre-Generating Content
Generate audio for all lesson materials during a build step or nightly job. This ensures that user interactions are instant, as the audio is already available.
Use this strategy for static content like vocabulary lists or grammar explanations. Dynamic content may still require on-demand generation, but pre-generation covers the majority of language learning materials.
Pre-generated audio files should be tagged with metadata such as voice, language, and duration for easy retrieval and management.
- Generate audio during build or nightly jobs
- Ensures instant playback for users
- Ideal for static lesson content
Testing and Validation
Before production deployment, verify that the API returns synthetic audio files with correct metadata. Use the /v1/voices endpoint to confirm available voices and languages match your application’s requirements. This step ensures your integration layer can parse the response format accurately.
Using the Demo Endpoint
Send a test request to the speech endpoint with a short string to verify connectivity. Check that the response returns a binary audio file in your chosen format (mp3, wav, opus, flac, or pcm). Confirm the response time is within acceptable limits for your user experience.
- Send a POST request with 100 characters.
- Verify response headers contain content-type.
- Check file size matches expected duration.
Validating Voice Selection
Test each of the eight voice presets (aria, nova, luna, sage, felix, milo, atlas, orion) to ensure they render correctly in your player. Verify that voice characteristics remain consistent across multiple generations. Confirm that the audio does not contain clipping or distortion at default speeds.
- Test all 8 voice presets.
- Check audio quality at 1.0x speed.
- Verify no clipping in output.
Checking Language Accuracy
Validate pronunciation for all 23 supported languages by providing text in each language script. Set the language parameter explicitly for Latin-script text to avoid default English guessing. Ensure that non-Latin scripts (e.g., Chinese, Japanese, Arabic) are rendered correctly without fallback to default voices.
- Test all 23 supported languages.
- Set explicit
languageparameter. - Verify non-Latin script rendering.
Deployment Considerations
Environment variables should store the API key and base URL to prevent hardcoding secrets in source control. Use the official OpenAI SDK with a custom base_url pointing to https://api.do666ok.com/v1 for seamless integration with existing language learning stacks.
Environment Variables
Store TTS_API_KEY and TTS_BASE_URL in your deployment environment. This ensures keys rotate securely without code changes. Use standard .env files for local development and secret managers for production.
- Use
TTS_API_KEYfor Authorization headers. - Set
TTS_BASE_URLto https://api.do666ok.com/v1. - Exclude .env files from version control.
Key Rotation Schedules
The API supports one active key per account. Generate a new key via the /get-api-key/ dashboard; the old key stops immediately. Rotate keys periodically to limit exposure if a leak occurs, ensuring minimal downtime during the switch.
- Issue new key via dashboard.
- Old key invalidates instantly.
- No downtime if updated promptly.
Monitoring Usage Spikes
Rate limits are 60 requests per minute per key. Monitor your application’s request rate to avoid queueing delays, which extend generation time for long texts. Use the usage dashboard to track character counts and request status.
- Limit: 60 requests/minute.
- Queue delays affect speed.
- Track usage in dashboard.

Cost Management
Efficient cost management for language learning applications relies on accurate character counting, as billing is calculated per character ($0.01 per 1,000 characters). Each API request processes up to 4,096 characters, requiring text splitting for longer lessons. Monitoring usage via the dashboard ensures predictable expenditure without overpaying for unused capacity.
Tracking Character Counts
Count spaces and punctuation as characters to ensure accurate budgeting. Use the /v1/voices endpoint to verify pricing details before deployment. Track cumulative usage to anticipate when the free trial credit ($0.50 for ~50,000 characters) expires after seven days.
- Include spaces and punctuation in character totals.
- Monitor dashboard for real-time usage statistics.
- Note trial credit validity period.
Budget Alerts
Set internal thresholds to trigger notifications before balance depletion. Since there are no monthly plans or automatic subscriptions, manual top-ups are required to maintain service continuity. Review usage logs regularly to identify unexpected spikes in audio generation volume.
- Implement internal spending thresholds.
- Review usage logs weekly.
- Monitor balance depletion rates.
Top-Up Automation
Top-ups are processed via USDT on the TRON network (TRC-20) with a $5 minimum. Credits are added automatically within minutes of transfer confirmation. No invoices or VAT are generated, simplifying accounting for indie developers using standard payment gateways.
- Use USDT (TRC-20) for top-ups.
- Minimum top-up amount is $5.
- Credits are available within minutes.
Common Pitfalls
Integration errors often stem from misconfigured endpoints or ignored constraints. Ensuring the correct base URL and understanding rate limits prevents immediate service disruption.
Incorrect Base URL Usage
Developers must configure the SDK's base URL to https://api.do666ok.com/v1. Using the standard OpenAI URL without modification will result in authentication failures or missing endpoint errors.
- Set
base_urlexplicitly in your SDK client. - Verify the endpoint path matches
/v1/audio/speech.
Ignoring Rate Limits
The API enforces a limit of 60 requests per minute per key. Exceeding this threshold triggers a 429 error, halting synthesis until the window resets.
- Implement exponential backoff for retry logic.
- Monitor usage metrics to stay below 60 req/min.
Mismatched Voice-Language Pairs
While any voice can speak any supported language, omitting the language parameter for non-English Latin-script text may cause incorrect pronunciation. Always specify the ISO code for precision.
Advanced Techniques
Advanced integration strategies allow for more dynamic language learning experiences by leveraging the API’s granular controls. By adjusting speed parameters and managing multi-voice outputs, developers can create more engaging and pedagogically sound audio content for their applications.
These techniques optimize the user experience while maintaining strict adherence to the API’s character limits and formatting requirements, ensuring that generated audio remains accurate and consistent across different learning modules.
Dynamic Speed Adjustment
The API accepts a speed parameter ranging from 0.25 to 4.0, allowing developers to modify pronunciation clarity for learners. Slower speeds (e.g., 0.75) aid comprehension for beginners, while faster rates (e.g., 2.0) simulate natural speech for advanced users.
Speed adjustments are applied per request, enabling real-time adaptation based on user proficiency levels without regenerating the audio file.
- Set speed between 0.25 and 4.0 via the
speedfield. - Use lower speeds for vocabulary drills and higher speeds for listening comprehension tests.
Multi-Voice Narration
Developers can combine multiple voices (e.g., aria for narration and milo for dialogue) within a single lesson by concatenating audio files. Since the API returns distinct audio files per request, manual stitching is required for multi-voice scenes.
This approach allows for distinct character voices in language exercises, enhancing engagement and helping learners distinguish between different speakers in a dialogue.
- Generate each voice segment separately using different
voiceparameters. - Concatenate the resulting audio files using a standard library (e.g., FFmpeg or pydub).
Audio Format Conversion
The API supports mp3, wav, opus, flac, and pcm formats. While mp3 is efficient for storage, wav or flac may be preferred for high-fidelity language learning where audio quality is critical.
Select the response_format parameter during the request to receive the desired format directly, eliminating the need for post-processing conversion in most cases.
- Choose
mp3for smaller file sizes orwav/flacfor higher quality. - Specify the format in the request body to avoid additional conversion steps.
Support and Resources
EchoLingua provides centralized documentation for API integration into language learning applications. The /docs/ endpoint details request structures, voice parameters, and response formats. Developers can reference the /get-api-key/ page for account setup and initial credit verification.
Documentation Links
Access the complete API reference at /docs/. This includes the /v1/voices endpoint for listing available languages and the /v1/models endpoint for model specifications. Use these resources to verify character limits and supported audio formats before implementation.
- /docs/ - API Reference
- /get-api-key/ - Account Setup
- /pricing/ - Cost Structure
Email Support Contact
Support is available via email only. There is no phone number or live chat for direct inquiries. Send technical questions or billing issues to the address provided on the /contact/ page. Response times are not guaranteed under an SLA.
Community Forums
Community forums are not provided. EchoLingua does not maintain official discussion boards or user groups. For community-driven troubleshooting, developers should refer to general developer platforms. All support interactions are handled directly through the email channel.
Future Scalability
Scalability for language learning applications relies on the API’s consistent character-to-audio ratio and predictable queue behavior. Since requests are processed sequentially, high-volume apps should implement client-side batching or distributed queuing to prevent rate limit saturation, ensuring that character counts remain accurate across all generated lessons.
Handling Increased Traffic
The 60 requests per minute limit applies per key. For high-traffic educational platforms, distribute load across multiple keys or implement exponential backoff to handle the 10 requests/minute baseline gracefully during peak usage hours.
- Implement client-side queuing to smooth traffic spikes.
- Monitor queue wait times for long-text lessons.
Adding New Voices
Currently, the eight preset voices (aria, nova, luna, sage, felix, milo, atlas, orion) cover the required range for language instruction. New voices are not added dynamically; expansion requires a platform update. Plan voice selection based on these existing presets for all future curriculum needs.
- Voice library is static until platform update.
- Use existing presets for diverse teaching styles.
Expanding Language Support
The API supports 23 specific languages. Expansion is limited to this set; unsupported languages like Vietnamese or Thai cannot be added on demand. Ensure your app’s language list aligns strictly with the supported ISO codes to avoid fallback errors or inaccurate speech synthesis.
- Strictly use the 23 supported languages.
- Verify ISO codes before generation.
Security Best Practices
Secure handling of API credentials ensures that audio generation remains authorized and billed correctly. The API key, prefixed with tts-, authenticates all requests to https://api.do666ok.com/v1.
Hiding API Keys
Include the key in the Authorization: Bearer header. Avoid hardcoding it in client-side JavaScript used for direct user-facing demos, as it becomes exposed in network traffic.
- Use environment variables for server-side injection.
- Never commit keys to public version control.
Secure Storage
Store keys in encrypted configuration files or secure vaults. Since only one key is active per account, secure storage protects your entire billing balance.
Key Expiration Policies
Revoke the current key and issue a new one at any time via the dashboard. The old key stops immediately, limiting exposure if compromised.
Compliance and Data
EchoLingua’s API is designed for indie developers building language learning applications. We prioritize data integrity and user privacy by ensuring that input text is used exclusively for audio synthesis and is not retained for model training. The generated audio is streamed directly to the client and is not stored on our servers, minimizing long-term data exposure.
Data Retention Policies
Request metadata, including timestamp, character count, and status, is retained solely for billing accuracy and audit purposes. Input text is discarded immediately after synthesis unless required for immediate error debugging. No long-term storage of user-generated content occurs on our infrastructure.
User Privacy Considerations
Since audio files are not stored, user voice data remains transient. Developers are responsible for managing client-side storage of generated audio. Our system does not collect personal identifiers beyond account creation data, ensuring compliance with general privacy standards for educational tools.
Audio Watermarking
Every generated audio file contains an inaudible watermark marking it as synthetic speech. This allows language learning platforms to distinguish AI-generated pronunciation guides from human-recorded content, maintaining transparency with end-users without affecting audio quality or playback compatibility.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Build your app with multilingual support so players worldwide can learn the language effortlessly.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- Node.js documentation
- openai-python on GitHub
- ISO 639 language codes
- W3C WAI: making audio and video accessible
- LibriTTS-R paper (arXiv 2305.18802)
- openai-node on GitHub
- MDN: Web Speech API
- OpenAI API reference: create speech
- IETF RFC 7845: Ogg Opus
- Creative Commons Attribution 4.0
- LibriVox public-domain audiobooks
