EN ▾
Get API key

Troubleshooting Qwen Abliterated API Errors

Switching to an independent uncensored API often introduces new error patterns that differ from major providers. This guide helps you diagnose common issues like rate limits and authentication failures, ensuring stable generation for your projects.

Server rack with glowing lights and floating error codes illustrating API troubleshooting

Understanding Authentication and Key Errors

When integrating with our API, the most frequent issue developers face is the 401 Unauthorized error. This usually indicates that the API key provided in the request header is invalid, missing, or has been revoked. Unlike some competitors that allow anonymous access for limited tests, our service requires a valid key for every request. If you receive this error, first verify that you copied the key exactly as it appeared during signup. The key is shown immediately after you sign up with Google or an email and password, so check your email or account dashboard for the correct string.

Another common cause for 401 errors is using a key from a different environment or forgetting to update it after a rotation. Since our API is hosted at a specific base URL, ensure your client library is pointing to the correct endpoint. If you are using a library that auto-discovers endpoints, it might be pointing to a different version of the API. Always hardcode the base URL to avoid these routing issues.

It is also important to note that our API does not support email-based login for the API key itself. The key is tied to your account, not your email address directly. If you suspect your key is compromised, you can generate a new one through your dashboard. The old key will stop working immediately, so any running processes using the old key will start returning 401 errors until updated.

Finally, ensure that your request headers include the authorization token in the correct format. The standard format is Bearer YOUR_API_KEY. Missing the Bearer prefix or adding extra spaces can cause the server to reject the key. Double-check your HTTP headers for any trailing whitespace or incorrect formatting that might interfere with the authentication process.

Managing Credit and Handling 402 Errors

The 402 Payment Required error occurs when your prepaid credit is exhausted. Our service operates on a prepaid model where you top up with crypto. If you do not have sufficient balance, the API will refuse requests and return a 402 status. This is different from a subscription model where you might have a grace period. Here, the service stops immediately once the balance hits zero.

To avoid this, monitor your usage closely. You can check your balance in your account dashboard. Since we do not offer a free unlimited tier, you must maintain a positive balance. The trial credit of $0.50 is only for new accounts and is not renewable. Once used, you must top up to continue using the service.

Top-ups are processed via crypto, specifically USDT on TRC20 or USDC on Base. Transactions can take time to confirm. If you have sent crypto but still see a 402 error, wait for the blockchain confirmation. The credit is added only after the transaction is confirmed on the blockchain. Rushing to make requests before confirmation will result in continued 402 errors.

Also, note that errors and refusals are free. If your request fails due to a server error or a content refusal, it does not consume credit. This means you can test your integration extensively without worrying about burning through your balance on failed requests. However, successful completions will deduct from your balance according to the token usage.

Dealing with Rate Limits and 429 Errors

Rate limiting is a critical aspect of API usage. Our API enforces a limit of 300 requests per minute per key. If you exceed this limit, you will receive a 429 Too Many Requests error. This is designed to prevent abuse and ensure stable performance for all users. If you are building a high-throughput application, you need to implement backoff strategies.

When you encounter a 429 error, do not immediately retry. Implement an exponential backoff strategy. Wait for a short period, then retry. If the error persists, increase the wait time. This prevents your application from flooding the API with requests and getting blocked for longer periods. Most HTTP clients have built-in support for exponential backoff, which you should enable.

It is also important to monitor your request volume. If you are processing large batches of text, consider breaking them down into smaller chunks. This helps you stay within the rate limit while still processing your data. You can also distribute requests across multiple API keys if you have them, as the limit is per key.

Finally, be aware that the rate limit applies to all requests, including those that return errors. Even if a request fails with a 400 Bad Request, it still counts towards your rate limit. Therefore, ensure your requests are well-formed before sending them to avoid wasting your rate limit quota.

Configuring Parameters for Stable Output

Our API supports various parameters that can affect the stability and quality of the output. Parameters like temperature, top_p, and stop sequences allow you to control the randomness and format of the response. If you are experiencing inconsistent results, check these parameters. A high temperature value can lead to more creative but less predictable outputs, while a low value ensures more consistent responses.

JSON mode is another feature that can help with stability. By setting the response format to JSON, you ensure that the output is structured and easy to parse. This is particularly useful for applications that require structured data. If you are using JSON mode, ensure that your prompt is clear and concise to avoid parsing errors.

Function calling is also supported, allowing you to define tools that the model can use. This can enhance the functionality of your application. However, it requires careful setup of the tool definitions and the model's response format. If you are not using function calling, ensure that you are not including tool definitions in your request, as this can cause confusion.

Additionally, the seed parameter allows you to reproduce the same output for a given prompt. This is useful for testing and debugging. If you are seeing unexpected behavior, try setting a fixed seed to see if the issue is related to randomness. This can help isolate problems in your prompt or model configuration.

When This API Is Not the Right Choice

While our API is powerful for text generation, it may not be the right choice for all use cases. If you need image, audio, or video generation, our API does not support these features. It is a text-only service. If your application requires multimodal capabilities, you should look for a provider that offers a broader range of models.

Similarly, if you need embeddings for semantic search, our API does not provide this feature. You would need to use a separate embedding service or a different provider that offers both text generation and embeddings. Our API is focused on chat completions and responses, so it is best suited for applications that primarily deal with text.

Another limitation is the lack of fine-tuning capabilities. If you need to train a custom model on your specific dataset, our API does not support fine-tuning. You would need to use a provider that offers fine-tuning services. Our API serves a pre-trained model, so you cannot customize the model's behavior beyond the parameters provided.

Finally, if you require an SLA or certifications like SOC2 or HIPAA, our API does not offer these guarantees. We are an independent service focused on providing uncensored text generation. If your application has strict compliance requirements, you should verify these with your legal team and consider a provider that offers these certifications.

Troubleshooting Common Integration Issues

Integration issues can arise from various sources, including network connectivity, library versions, and request formatting. If you are experiencing connectivity issues, check your internet connection and ensure that your server can reach the API endpoint. Sometimes, firewalls or proxy settings can block requests to the API. Ensure that your network allows outbound traffic to the API domain.

Library versions can also cause issues. If you are using a third-party library to interact with the API, ensure that it is up to date. Older versions of libraries may not support the latest API features or may have bugs that cause errors. Check the library's documentation for compatibility with our API version.

Request formatting is another common source of errors. Ensure that your JSON payloads are well-formed and match the expected schema. Invalid JSON can cause the server to reject the request. Use a JSON validator to check your payloads before sending them. Also, ensure that you are using the correct content type header, which should be application/json.

Finally, if you are using a client library, check its error handling. Some libraries may not propagate errors correctly, making it difficult to diagnose issues. Ensure that you are catching and logging errors properly. This will help you identify the root cause of any integration problems.

Best Practices for Error Handling

Effective error handling is important for building reliable applications. When interacting with our API, implement a strategy that handles different error codes appropriately. For 401 errors, check your API key and credentials. For 402 errors, monitor your credit balance and top up as needed. For 429 errors, implement exponential backoff and retry logic.

It is also important to log errors for debugging. Record the error code, the request details, and the response body. This information can be invaluable when troubleshooting issues. Use a logging service to store these logs and analyze them over time to identify patterns.

Additionally, consider implementing a fallback mechanism. If the API is unavailable or returning errors, have a fallback strategy in place. This could involve using a different API provider or caching responses. This ensures that your application continues to function even if the API experiences issues.

Finally, keep your error messages user-friendly. Instead of showing raw API errors to the end user, translate them into meaningful messages. For example, instead of showing a 402 error, inform the user that their credit is low and they need to top up. This improves the user experience and reduces confusion.

Frequently asked questions

How do I fix a 401 Unauthorized error?

Check that your API key is correct and included in the request header with the Bearer prefix. Ensure you are using the key from your account dashboard and that it has not been revoked.

Why am I getting a 402 Payment Required error?

This error means your prepaid credit is exhausted. You need to top up using USDT on TRC20 or USDC on Base. Wait for the blockchain confirmation before your credit is added.

What is the rate limit for the API?

The rate limit is 300 requests per minute per key. If you exceed this, you will receive a 429 error. Implement exponential backoff to handle these errors gracefully.

Does the API support image generation?

No, the API is text-only. It does not support image, audio, or video generation. If you need multimodal capabilities, consider a different provider.