EN ▾
Get API key

Troubleshooting Unrestricted API Errors

Developers often face friction when switching providers, particularly regarding rate limits and connection stability. This guide addresses common error codes and offers a stable approach for consistent text generation using our uncensored model.

Digital illustration of an unrestricted API server with data streams and code elements

Understanding Common Error Codes

When integrating our API, developers frequently encounter specific HTTP status codes that indicate the state of their account or request. The most common issues involve authentication, credit balance, and rate limiting. Knowing how to interpret these codes allows for faster resolution and smoother development workflows. We provide clear indicators for each failure mode to help you debug efficiently.

A 401 error indicates an invalid or missing API key. This usually happens when the key is not included in the header or has been revoked. Ensure you are using the key shown immediately after signup. A 402 error means you have no prepaid credit left. Since we do not offer subscriptions, you must top up to resume service. This is a billing issue, not a technical fault.

A 429 error signals that you have exceeded the rate limit of 300 requests per minute per key. This is a hard limit to ensure stability for all users. If you hit this limit, you must wait for the window to reset or reduce your request frequency. These codes are distinct from network errors and point directly to account or usage limits.

Errors and refusals are free of charge, which is a key feature for testing. You are only charged for successful token usage. This means you can test your integration heavily without financial risk, provided you have the initial trial credit or a small top-up. Understanding these distinctions prevents confusion when your application behaves unexpectedly.

Managing Prepaid Credit and Top-Ups

Our service operates on a prepaid model charged by real token usage. You are not billed a monthly fee, and your paid credit never expires. This model offers flexibility for indie builders and developers who do not need a continuous subscription. However, it requires active management of your account balance to avoid service interruptions.

Top-ups are accepted only via cryptocurrency. You can use USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. You can choose any whole amount within this range. This restriction means you cannot use credit cards, PayPal, or bank transfers for funding your account.

When you top up from $50, you receive bonus credit ranging from +5% to +15%. This bonus is added to your account immediately. It provides a buffer for testing and allows you to experiment with longer prompts or higher temperature settings without immediately depleting your base credit. It is a valuable feature for optimizing your usage costs.

You start with $0.50 of trial credit upon signup, requiring no card. This allows you to test the API endpoints and verify your integration before committing to a top-up. If you run out of credit, you will receive a 402 error. You must top up again to continue using the service. The prepaid model ensures transparency in your spending.

Handling Rate Limits and Concurrency

The rate limit of 300 requests per minute per key is a critical constraint for high-volume applications. If you are sending bulk requests or running multiple instances of your application, you may hit this limit quickly. It is essential to implement exponential backoff strategies in your code to handle 429 errors gracefully. This prevents your application from flooding the API and causing further throttling.

Each key is independent, so you can generate multiple keys to increase your total throughput. However, each key still has its own 300 requests per minute limit. You can distribute your load across several keys to achieve higher concurrency. This is a common strategy for developers who need to process large datasets or run real-time applications.

Streaming over SSE is supported, which can help manage perceived latency. By receiving usage information in the last chunk, you can monitor your token consumption in real-time. This allows you to adjust your request frequency dynamically. It is particularly useful for chat applications where you want to provide immediate feedback to users while managing your rate limit budget.

Function calling and JSON mode are also available features. These features allow for more structured responses and tool integration. However, they still count towards your rate limit. Ensure your application logic accounts for the overhead of parsing these responses. Proper error handling for these features is just as important as handling basic text responses.

Configuring Model Parameters

Our API supports several parameters to control the behavior of the uncensored model. You can adjust the temperature, top_p, stop sequences, and seed. These parameters allow you to fine-tune the output for your specific use case. For example, a lower temperature produces more deterministic results, while a higher temperature increases creativity.

The seed parameter is useful for reproducibility. By setting a specific seed, you can get the same response for the same prompt. This is valuable for testing and debugging your application. It ensures that your integration behaves consistently across different runs. You can also use stop sequences to truncate responses at specific points.

Penalties are available to discourage certain tokens or patterns. This can help improve the quality of the output for specific tasks. For instance, you might penalize repetitive phrases or unwanted keywords. These parameters give you precise control over the model's output, allowing you to tailor it to your needs.

Context window support is up to 100,000 tokens for both prompt and completion combined. This allows for long-form content generation and complex context handling. However, larger contexts consume more tokens, which impacts your prepaid balance. Be mindful of your token usage when working with long documents or extensive chat histories.

When This API Is Not the Right Choice

While our API excels at text generation, it is not a complete solution for all developer needs. If your application requires image, audio, or video generation, this API will not suffice. It is a text-in, text-out service. You cannot use it for OCR, embeddings, or fine-tuning models. If you need these features, you must look for a different provider.

The model is uncensored, meaning it does not refuse lawful adult, fictional, security-research, or controversial topics. However, it does refuse sexual content involving minors. If your application requires strict content filtering for all types of sensitive material, this model might not be the best fit. You would need to implement additional filtering layers.

The pricing model is prepaid and crypto-only. If your business requires monthly subscriptions, credit card payments, or bank transfers, this service may not align with your financial workflow. You must be comfortable with the top-up process and the lack of traditional payment methods. This is a significant constraint for some enterprises.

There is no SLA, certification, or on-prem deployment option. If you need guaranteed uptime percentages or specific data residency requirements, this hosted service might not meet your needs. It is designed for developers who prioritize flexibility and uncensored output over enterprise-grade guarantees. Always evaluate your specific requirements before committing.

Troubleshooting Connection and Integration Issues

Connection drops can occur due to network instability or server-side issues. If you experience frequent disconnections, check your network configuration and ensure your application handles retries properly. Our API supports streaming over SSE, which can help maintain a stable connection for long-running requests. However, network interruptions can still disrupt the stream.

Ensure you are using the correct base URL: https://api.unrestrictedgpt.cc/v1. Using the wrong endpoint can lead to unexpected errors. The API supports POST /v1/chat/completions and POST /v1/responses for text generation, and GET /v1/models for listing available models. Stick to these endpoints to avoid compatibility issues.

If you encounter persistent errors, verify your API key and credit balance. A 401 error indicates an invalid key, while a 402 error indicates no credit. These are the most common causes of service interruption. Make sure your key is included in the request header and that you have sufficient prepaid credit to cover your usage.

For developers switching providers, it is important to note that our API is independent. It does not claim to be an official site or partner of any other company. When comparing features, check the vendor's own documentation for current prices and limits. This ensures you have accurate information when evaluating alternatives. Our service is designed for developers who need a reliable, uncensored text API.

Best Practices for Stable Text Generation

To ensure stable text generation, implement reliable error handling in your application. Catch 401, 402, and 429 errors and respond appropriately. For 429 errors, use exponential backoff to retry requests. This prevents overwhelming the API and ensures a smoother user experience. It is a best practice for any API integration.

Use the trial credit to test your integration thoroughly before making a top-up. This allows you to verify that your application works correctly with our API. You can test different parameters, such as temperature and seed, to find the optimal settings for your use case. This minimizes the risk of wasting prepaid credit on a flawed integration.

Monitor your token usage to manage your prepaid credit effectively. Since errors and refusals are free, you can test extensively without incurring costs. However, successful requests consume tokens, so keep an eye on your balance. You can top up from $20 to $500 to ensure you have enough credit for your projects.

Finally, stay updated with our API documentation for any changes to endpoints or features. While we do not claim SLAs or certifications, we strive to provide a reliable service. By following these best practices, you can build a stable and efficient application using our uncensored text API. It is a powerful tool for developers who need flexibility and control over their text generation.

Frequently asked questions

How do I fix a 401 error?

A 401 error means your API key is invalid or missing. Check that you are using the correct key from your account dashboard and that it is included in the request header.

What happens if I run out of credit?

You will receive a 402 error. You must top up your account using USDT on TRC20 or USDC on Base to resume service. Your paid credit never expires, so you can top up later.

Can I use credit cards to pay?

No, we only accept crypto top-ups. You can use USDT on TRC20 or USDC on Base for amounts between $20 and $500. Credit cards, PayPal, and bank transfers are not supported.

Is there a rate limit?

Yes, the limit is 300 requests per minute per key. If you exceed this, you will get a 429 error. You can use multiple keys to increase your total throughput.