Troubleshooting Embedding API Errors and Rate Limits
When building applications that rely on stable text generation, unexpected errors can disrupt workflows. This guide explains how to handle common API failures, manage rate limits, and troubleshoot connectivity issues with our uncensored text service.

Understanding Common Error Codes
When integrating with any API, encountering error codes is a normal part of the development process. Our API returns specific HTTP status codes to help you diagnose issues quickly. The most common errors you will encounter are 401, 402, and 429. Understanding these codes allows you to build more resilient applications that can recover from temporary failures without manual intervention.
A 401 Unauthorized error indicates that your API key is invalid or missing. This often happens when keys are rotated or when a request is sent without the proper Authorization header. Ensure that your key is stored securely and passed correctly in every request. If you suspect your key is compromised, generate a new one immediately through your dashboard.
A 402 Payment Required error occurs when your account has insufficient prepaid credit. Since our service uses a prepaid model, requests are declined if the balance is too low to cover the token usage. This error is free to retry once credit is added. It is important to monitor your balance to avoid sudden service interruptions during high-traffic periods.
A 429 Too Many Requests error signals that you have exceeded the rate limit of 300 requests per minute per key. This limit is enforced to ensure fair usage across all users. When you hit this limit, your application should pause and retry after a short delay. Implementing exponential backoff strategies can help you recover gracefully from these temporary blocks.
Handling Rate Limits and Throttling
Rate limits are a critical component of maintaining service stability. Our API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. To manage this effectively, you should implement a retry mechanism in your code. Exponential backoff is a standard technique where the delay between retries increases with each attempt. This prevents your application from flooding the server with requests while it is still recovering.
For applications with high throughput, consider distributing requests across multiple API keys if your use case allows it. This can help you bypass per-key limits and maintain a higher overall throughput. However, keep in mind that each key is subject to the same 300 requests per minute limit. Monitor your usage closely to ensure you do not accidentally exceed limits on any single key.
Another strategy is to implement a local queue for your requests. By queuing requests locally, you can control the rate at which they are sent to the API. This is particularly useful for batch processing tasks where you need to process a large number of items. You can adjust the queue size and processing speed based on your specific needs and the current load on the API.
It is also important to handle rate limit errors gracefully in your user interface. If a user experiences a 429 error, provide clear feedback that their request is being processed or that they need to wait before trying again. This improves the user experience and reduces frustration when encountering temporary service limitations.
Managing Prepaid Credit and Payments
Our API uses a prepaid credit model, which means you pay for what you use without any monthly subscriptions. Credit is charged based on real token usage, and errors or refusals are free. This model allows you to control your costs precisely. You can add credit using crypto only, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. There are no credit card or PayPal options available.
When you top up your account, you receive credit immediately. If you add between $50 and $500, you may receive bonus credit ranging from 5% to 15%. This bonus credit never expires, allowing you to build a buffer for future usage. It is advisable to keep a small buffer in your account to avoid service interruptions due to insufficient funds.
Errors and refusals do not consume credit, which can help you save money during testing phases. For example, if you send a request with an invalid parameter, you will receive an error but no tokens will be deducted. This is useful for debugging your integration without worrying about costs. However, successful requests that return text will consume tokens from your balance.
To manage your credit effectively, monitor your usage regularly. You can check your balance and usage history through your dashboard. If you notice unusual activity, such as a rapid depletion of credit, investigate potential issues like infinite loops or excessive logging. Keeping track of your token usage helps you budget accurately and avoid unexpected charges.
Debugging Integration Issues
When integrating with our API, you may encounter issues that are not immediately obvious. One common problem is incorrect request formatting. Ensure that your requests follow the OpenAI-compatible format. This includes using the correct endpoint URLs and passing parameters in the expected structure. Misformatted requests can lead to unexpected errors or silent failures.
Another common issue is incorrect authentication. Make sure that your API key is included in the Authorization header of every request. If the key is missing or invalid, you will receive a 401 error. Double-check that you are using the correct key for your account and that it has not been revoked or expired. If you are using multiple keys, ensure that you are using the correct one for each environment.
Network issues can also cause integration problems. If you experience frequent timeouts or connection errors, check your network connectivity. Ensure that your application can reach the API endpoints without interference from firewalls or proxies. If you are using a proxy, make sure it is configured correctly to forward requests to the API.
Logging is essential for debugging integration issues. Implement detailed logging in your application to capture request and response data. This can help you identify where things are going wrong. Look for patterns in the errors, such as specific parameters or endpoints that are causing issues. Use this information to refine your integration and improve reliability.
When Our API Is Not the Right Choice
While our API is powerful for text generation, it may not be the right choice for every project. Our service is focused on uncensored text generation and does not support embeddings, image generation, audio, video, OCR, or fine-tuning. If your application requires any of these capabilities, you will need to use a different service or combine our API with other tools.
For example, if you need to generate images or process audio, our API cannot handle these tasks directly. You would need to use a separate service for these functions and integrate them into your workflow. Similarly, if you need to fine-tune a model for a specific domain, our API does not support this feature. You would need to use a service that offers fine-tuning capabilities.
Additionally, if you require high availability guarantees or specific compliance certifications, our API may not meet your needs. We do not offer SLA percentages, SOC2, HIPAA, or ISO certifications. If these are critical for your application, you should evaluate other providers that offer these features.
Finally, if you need a free unlimited tier or support for multiple models, our API may not be suitable. We offer a prepaid model with a single uncensored text model. If you need to switch between different models or require a free tier, you should look for a service that offers these options. Always evaluate your specific needs before choosing an API provider.
Addressing Community Questions
Developers often ask about the best practices for handling embedding APIs and managing costs. In discussions on Reddit, users share their experiences with various embedding services and tools. Some users build local semantic caches to reduce reliance on third-party APIs, while others optimize their code to minimize redundant calls. These community insights highlight the importance of efficient API usage.
One common theme in these discussions is the need for stable embedding APIs. Fluctuating outputs or flaky connections can disrupt applications that rely on semantic search or recommendation systems. Users emphasize the importance of choosing a reliable provider and implementing reliable error handling. This aligns with our focus on providing a stable text generation service.
Another topic of discussion is the cost of embedding APIs. Users often look for ways to reduce costs by pre-computing embeddings or using local models. While our API does not offer embeddings, the principles of cost optimization apply. By monitoring usage and implementing efficient request patterns, you can manage costs effectively.
Users also discuss the trade-offs between convenience and transparency in AI frameworks. Many frameworks are designed for ease of use in demos but may lack transparency in production. This highlights the need for developers to understand the underlying mechanics of the APIs they use. By understanding how requests are processed and costs are incurred, you can build more efficient and cost-effective applications.
Best Practices for Production
When deploying your application to production, it is important to follow best practices to ensure reliability and performance. First, implement comprehensive error handling. This includes handling network errors, rate limits, and authentication failures gracefully. Provide meaningful error messages to users and log detailed information for debugging.
Second, monitor your API usage closely. Track metrics such as request volume, error rates, and token consumption. This data can help you identify potential issues before they become critical. Set up alerts for unusual activity, such as sudden spikes in traffic or unexpected errors. This allows you to respond quickly to problems and maintain service availability.
Third, optimize your requests for efficiency. Minimize the number of requests by batching where possible and caching results when appropriate. Use streaming for long responses to improve user experience. Ensure that your application handles streaming correctly to avoid blocking the main thread.
Finally, keep your integration up to date. Regularly check for updates to the API and adjust your code as needed. Stay informed about any changes to rate limits, pricing, or features. By staying proactive, you can ensure that your application continues to perform well and meet your users' needs.
Frequently asked questions
What happens if I exceed the rate limit?
You will receive a 429 error. Implement exponential backoff to retry your requests after a short delay. You can also distribute requests across multiple keys to increase throughput.
How do I add credit to my account?
You can add credit using USDT on TRC20 or USDC on Base. The minimum top-up is $20 and the maximum is $500. Bonus credit is available for top-ups of $50 or more.
Does the API support image generation?
No, the API is text-only. It does not support image, audio, video, or embedding generation. You will need to use a separate service for these capabilities.
What is the context window size?
The context window is 100,000 tokens, which includes both the prompt and the completion. This allows for processing long documents and conversations.