EN ▾
Get API key

Troubleshooting Uncensored API: Bias and Refusals

Developers often encounter unexpected refusals or residual bias when integrating uncensored models into their applications. This guide explains how to troubleshoot these issues using our API, focusing on configuration and context management to ensure consistent behavior.

Server rack with glowing data streams representing an uncensored AI model

Understanding Uncensored Behavior

The term uncensored implies that the model does not refuse lawful adult, fictional, security-research, or controversial topics. However, this does not mean the model is free from all constraints. Our API serves one uncensored open-weight text model, identified by the model id uncensored. It operates as a text-in, text-out service, meaning it generates text based on the input you provide without additional modalities like images or audio.

Residual bias can appear because the model was trained on vast amounts of text from the internet, including forums and social media. This training data contains inherent biases and prejudices. When you send a request, the model predicts the next token based on this data. If the prompt triggers a specific pattern associated with bias, the output may reflect that pattern.

To minimize unwanted bias, you can adjust parameters like temperature and top_p. A lower temperature makes the output more deterministic, while top_p controls the diversity of the output. Experimenting with these values can help you find a balance between creativity and consistency. Remember that the model is essentially a glorified autocomplete tool, so its behavior is heavily influenced by the quality of your prompt.

It is important to note that our API does not offer fine-tuning or model routing. You cannot train a custom model to remove specific biases. Instead, you must rely on prompt engineering and parameter adjustment to guide the model's behavior. This approach requires careful testing and iteration to achieve the desired results.

Troubleshooting Refusals and Errors

Refusals occur when the model decides not to generate a response, often due to the hard content limit regarding sexual content involving minors. These refusals are free, meaning you are not charged for the tokens, but they do count against your rate limit of 300 requests per minute. If you exceed this limit, you will receive a 429 error.

Other common errors include 401 for an invalid key and 402 for insufficient credit. Since our API uses prepaid credit charged by real token usage, ensure you have enough funds to avoid interruptions. You can top up your account with crypto, specifically USDT on TRC20 or USDC on Base, in amounts between $20 and $500.

To troubleshoot refusals, check your prompt for triggers that might activate the hard content limit. If the refusal is due to bias, try rephrasing the prompt or adjusting the temperature. You can also use the streaming feature to monitor the response in real-time, allowing you to stop the generation if it starts to deviate from the expected output.

Additionally, consider using the JSON mode to ensure the output is structured correctly. This can help you parse the response more easily and handle errors programmatically. If you encounter persistent issues, review your API key and credit balance to ensure everything is set up correctly.

Managing Context and Tokens

Our API supports a context window of 100,000 tokens, which includes both the prompt and the completion. This large context window allows you to send extensive instructions and receive long responses without losing context. However, it also means you need to manage your tokens carefully to avoid exceeding the limit.

Token usage is charged at $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. To estimate costs, you can calculate the number of tokens in your prompt and expected response. For example, if you send a prompt with 1,000 tokens and receive a response with 500 tokens, the cost is minimal. However, for long conversations, costs can add up quickly.

To optimize token usage, try to keep your prompts concise and relevant. Avoid including unnecessary information that does not contribute to the response. You can also use the stop parameter to terminate the generation early if the model starts to repeat itself or go off-topic.

Remember that errors and refusals are free, so you can experiment with different parameters without worrying about additional costs. This allows you to find the best configuration for your specific use case. Always monitor your token usage to stay within your budget.

Integrating with Your Application

Integrating our API into your application is straightforward, as it follows the OpenAI-compatible format. You can use the standard endpoints for chat completions, responses, and models. The base URL for the API is https://api.uncensoredaigenerator.cc/v1. This compatibility allows you to use existing libraries and tools designed for OpenAI.

To get started, sign up for an account using your Google account or email and password. You will receive an API key immediately, which you can use to authenticate your requests. The key is shown immediately after signup, so you can start testing right away.

When making requests, ensure you include the model id uncensored in your payload. You can also specify parameters like temperature, top_p, and stop to control the output. Use the streaming feature to receive responses in real-time, which is useful for chat applications.

For error handling, check the status codes returned by the API. A 401 error indicates an invalid key, while a 402 error means you have insufficient credit. A 429 error indicates that you have exceeded the rate limit. Handle these errors gracefully in your application to provide a smooth user experience.

When Our API Is Not the Right Choice

While our API is designed for uncensored text generation, it may not be the right choice for all use cases. If you need features like image generation, audio processing, or fine-tuning, our API does not support these capabilities. It is a text-only service, so if your application requires multimodal outputs, you will need to look elsewhere.

Additionally, if you require a specific model with unique benchmarks or certifications, our API may not meet your needs. We do not claim any SLA percentages, certifications, or named customers. If these factors are critical to your project, you should verify that our API aligns with your requirements.

Our API is also limited to a single uncensored model. If you need access to multiple models or the ability to route requests to different models, our API does not offer this functionality. You would need to integrate with a different service that supports model routing.

Finally, if you prefer a subscription-based pricing model with monthly fees, our prepaid credit system may not be suitable. We charge based on real token usage, with no monthly fee. If you have predictable usage patterns, a subscription might offer better value. Always evaluate your specific needs before choosing an API.

Addressing Community Concerns

Reddit discussions often highlight concerns about bias and refusals in uncensored AI models. Users on r/BrandNewSentence and r/AccidentalAlly have noted that uncensored AIs can still exhibit biases from their training data. These biases can manifest in various ways, such as preferring certain topics or exhibiting prejudiced language.

On r/LocalLLaMA, users discuss the challenge of finding an AI that is genuinely unfiltered yet technically advanced. Many models struggle to balance freedom with coherence, leading to responses that are either too restrictive or too chaotic. Our API aims to address this by providing a stable, uncensored model with predictable behavior.

Another common concern is the impact of training data on model output. Since models are trained on internet data, they inherit the biases and prejudices present in that data. This can lead to unexpected refusals or biased responses. By adjusting parameters and using prompt engineering, you can mitigate some of these effects.

Users also discuss the legal and financial implications of uncensored AI. While there is demand for open, uncensored AI, it can be a minefield for businesses. Our API provides a straightforward, prepaid solution that allows you to experiment without long-term commitments. This flexibility is valuable for developers testing new ideas.

Best Practices for Reliable Output

To ensure reliable output from our API, follow these best practices. First, always use the model id uncensored in your requests. This ensures you are interacting with the correct model. Second, experiment with parameters like temperature and top_p to find the right balance for your use case.

Use the streaming feature to monitor responses in real-time. This allows you to detect issues early and stop generation if necessary. Additionally, use the JSON mode to ensure your output is structured correctly. This makes it easier to parse and process the response in your application.

Monitor your token usage to stay within your budget. Since errors and refusals are free, you can experiment freely without worrying about additional costs. However, keep an eye on your credit balance to avoid interruptions.

Finally, stay updated with the latest features and limitations of our API. We do not claim any certifications or SLAs, so rely on the provided documentation for accurate information. By following these practices, you can maximize the value of our API and build reliable applications.

Frequently asked questions

What is the model ID for the uncensored API?

The model ID is uncensored. You must include this in your requests to ensure you are using the correct model.

How much does the API cost?

The API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free.

Can I use credit cards to top up?

No, top-ups are crypto only. You can use USDT on TRC20 or USDC on Base for amounts between $20 and $500.

What happens if I exceed the rate limit?

If you exceed 300 requests per minute, you will receive a 429 error. Your requests will be paused until the limit resets.