Troubleshooting Uncensored API Errors
When integrating an uncensored AI API into your application, encountering errors is inevitable. This guide helps you interpret status codes, manage retries, and understand the limits of our text-only service to build more resilient workflows.

Understanding HTTP Status Codes
When you send a request to our API, the server responds with an HTTP status code that tells you exactly what happened. The most common errors you will encounter are 401, 402, and 429. A 401 error means your API key is invalid or missing. This usually happens if you copied the key incorrectly or if you are using a key from a different environment. A 402 error indicates that you have no prepaid credit left. Since we charge by real token usage, a 402 error appears immediately when your balance hits zero. Errors and refusals are free, so you will not be charged for these failures. A 429 error signals that you have exceeded the rate limit of 300 requests per minute per key. This limit applies to the total number of requests, not just successful ones.
It is important to check the response body for details. The server provides clear messages for each error type. For example, a 402 response will tell you that no credit is available. A 429 response will inform you that you are being rate-limited. These messages help you debug your integration quickly. You should always log these errors in your application to track usage patterns. This allows you to adjust your request frequency or top up your credit before running out.
Understanding these codes helps you build better error handling in your code. You can set up your application to retry on transient errors like 429. For permanent errors like 401, you should prompt the user to refresh their key. This approach ensures that your application remains responsive even when issues arise. It also reduces the load on our servers by avoiding unnecessary retries for invalid keys.
Remember that our API focuses on text generation only. If you see an error related to image or audio generation, it might be because you are sending parameters for features we do not support. Stick to the text endpoints to avoid confusion. The endpoints are POST /v1/chat/completions and POST /v1/responses. Use GET /v1/models to check available models. Keeping your requests simple and focused on text helps minimize errors.
Managing Rate Limits and Retries
Rate limits are a standard feature of most APIs to ensure fair usage. Our API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. This limit is per key, so using multiple keys can increase your throughput. However, each key has its own limit. It is important to monitor your usage to avoid hitting this cap. You can track your requests by logging the timestamps of your API calls.
When you hit a rate limit, you should implement a retry mechanism. Exponential backoff is a common strategy. This means you wait for a short period, then double the wait time for each subsequent retry. This prevents your application from flooding the server with requests. You should also check the Retry-After header in the 429 response. This header tells you how long to wait before making another request.
Another strategy is to batch your requests. Instead of sending many small requests, try to combine them if possible. This reduces the total number of requests you make. For example, if you are processing a large document, you might split it into chunks and process them sequentially. This helps you stay within the rate limit while still achieving your goal. It also reduces the overhead of establishing new connections for each request.
Finally, consider using a queue system for your requests. A queue allows you to manage the order and timing of your requests. You can prioritize critical requests over less important ones. This ensures that your most important tasks are completed first. It also helps you manage your rate limit more effectively. By using a queue, you can smooth out spikes in traffic and avoid sudden bursts of requests that might trigger rate limits.
Handling Invalid Keys and Credits
An invalid key error (401) is one of the most common issues developers face. This error occurs when the API key you are using is incorrect or expired. Make sure you are using the correct key from your account dashboard. Keys are shown immediately after signup, so check that you copied it correctly. If you are using multiple keys, ensure you are using the one associated with the correct account.
Another common issue is running out of credit. Our API charges $0.15 per 1M input tokens and $0.50 per 1M output tokens. If you do not have enough credit, you will receive a 402 error. Prepaid credit is charged by real token usage. Errors and refusals are free, so you will not be charged for failed requests. This means you can test your integration without worrying about unexpected charges.
To avoid running out of credit, you should monitor your usage regularly. You can check your balance in your account dashboard. If you are using a lot of tokens, consider setting up alerts for when your balance is low. You can also top up your credit using crypto. We accept USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. Bonus credit is available for top-ups of $50 or more.
If you lose your key, you can generate a new one from your account. Make sure to update your application with the new key. If you are using a library or SDK, you may need to update the configuration file. Keep your keys secure and do not share them publicly. If you suspect your key has been compromised, generate a new one immediately. This helps protect your account from unauthorized usage.
Working with Context Windows and Tokens
Our API has a context window of 100,000 tokens. This window includes both the prompt and the completion. It is important to understand how tokens are counted to manage your context window effectively. Tokens are not the same as words. A single word can be split into multiple tokens. For example, the word 'unhappiness' might be split into 'un', 'happi', and 'ness'. This means your context window can hold more text than you might expect.
To estimate the number of tokens in your prompt, you can use a tokenizer. Most programming languages have libraries for this. You can count the tokens in your prompt and the expected completion. This helps you ensure that you do not exceed the 100,000 token limit. If you exceed the limit, the server will truncate your prompt. This can lead to incomplete or irrelevant responses. It is better to be safe and keep your prompts well within the limit.
You can also use the GET /v1/models endpoint to check the model details. This endpoint provides information about the available models. It helps you understand the capabilities of the model you are using. The model ID to send is 'uncensored'. This model is uncensored, meaning it does not refuse lawful adult, fictional, security-research, or controversial topics. However, it does refuse requests involving sexual content with minors.
Managing your context window is important for maintaining the quality of your responses. If your prompt is too long, the model might forget earlier parts of the conversation. This is known as the 'lost in the middle' phenomenon. To mitigate this, you can structure your prompts carefully. Put important information at the beginning and end of your prompt. This helps the model focus on the most relevant parts of your input.
Using Streaming and JSON Mode
Streaming is a feature that allows you to receive responses in real-time. This is useful for applications where you want to show the user the response as it is being generated. Our API supports streaming over Server-Sent Events (SSE). The usage information is included in the last chunk of the stream. This allows you to track your token usage in real-time. You can use this information to update your UI or log your usage.
JSON mode is another useful feature. It allows you to receive responses in a structured JSON format. This makes it easier to parse the response in your code. You can specify the JSON mode in your request parameters. This ensures that the model outputs valid JSON. This is particularly useful for applications that need to integrate with other systems. For example, you might use JSON mode to generate a configuration file or a database query.
Both streaming and JSON mode can help you build more reliable applications. Streaming reduces the perceived latency for the user. JSON mode simplifies the parsing process for your code. You can combine these features to create a smooth user experience. For example, you can stream a JSON response and parse it as it arrives. This allows you to update your UI in real-time.
It is important to handle errors in streaming and JSON mode carefully. If the stream is interrupted, you might lose some of the response. You should have a fallback mechanism to handle this. For JSON mode, ensure that the output is valid JSON. If the model outputs invalid JSON, you might need to retry the request. This helps ensure that your application receives reliable data.
When This API Is Not the Right Choice
While our API is powerful for text generation, it is not suitable for every use case. If you need image, audio, or video generation, our API is not the right choice. We focus solely on text input and text output. If you need embeddings, OCR, or fine-tuning, you should look for a different provider. Our API does not support these features. It is designed for developers who need a simple, uncensored text model.
If you require an SLA or certifications like SOC2 or HIPAA, our API might not meet your needs. We do not claim to offer these certifications. If you need on-prem deployment, our hosted service might not be the best fit. We are a hosted service, and we do not offer on-prem options. If you need benchmark scores or named customers, our API does not provide these metrics.
If you need a free unlimited tier, our API is not the right choice. We charge by token usage, and there is no free unlimited tier. You get a trial credit of $0.50, but you need to top up with crypto to continue using the service. If you need a model that supports multiple languages or specialized domains, you should check the documentation of other vendors. Our model is general-purpose and uncensored.
Finally, if you need a model that can route between different models, our API does not support this. We serve one uncensored open-weight text model. If you need model routing, you should look for a provider that offers this feature. Our API is simple and focused. It is ideal for developers who want a straightforward text API without complex features. If your needs are more complex, consider other options.
Addressing Common Developer Questions
Developers often ask about the philosophical implications of uncensored AI and how to use it responsibly. Threads on r/PromptEngineering discuss the idea that an AI without restrictions is a human right. Users worry about who controls the filters and the truth. Our API offers an uncensored model that does not refuse lawful adult or controversial topics. This gives developers more control over their content. However, it also requires them to manage the content themselves.
Another common question is how to handle the 'surveillance state' concerns. Some users worry about government oversight and moralists controlling AI. Our API is independent and does not claim to be approved by any government or moral board. We do not impose additional restrictions beyond the hard content limit for minors. This allows users to use the API for a wide range of applications, from creative writing to security research.
Users also ask about the best free AI without restrictions. Our API offers a trial credit of $0.50, which is free and does not require a card. This allows users to test the API without commitment. However, for ongoing use, you need to top up with crypto. This is a common model for uncensored APIs. It allows users to pay only for what they use.
Finally, users ask about the technical details of the model. Our model is an open-weight text model. It supports streaming, JSON mode, and function calling. It has a large context window of 100,000 tokens. These features make it suitable for a variety of applications. By understanding these details, developers can make informed decisions about how to use the API. This helps them build better applications and avoid common pitfalls.
Frequently asked questions
What happens if I run out of credit?
You will receive a 402 error. Errors and refusals are free, so you will not be charged for failed requests. You can top up your credit using USDT on TRC20 or USDC on Base.
How do I handle rate limits?
You can implement exponential backoff or use a queue system. The rate limit is 300 requests per minute per key. You can also use multiple keys to increase your throughput.
Does the API support image generation?
No, the API focuses on text generation only. It does not support image, audio, or video generation. You should check other providers for these features.
How do I get more trial credit?
Every new account gets $0.50 of trial credit. There is no way to get more trial credit. You need to top up with crypto to continue using the service.