EN ▾
Get API key

Troubleshooting Over-Refusal in Gemma Abliterated Prompts

Even with an uncensored model, developers sometimes encounter unexpected refusals. This guide explains how to adjust prompt structures to bypass residual safety filters and troubleshoot common refusal triggers in text generation.

Futuristic interface showing text stream with a warning icon

Understanding Residual Safety Filters

When you integrate an uncensored model into your application, you expect it to handle adult or controversial topics without hesitation. However, residual safety filters can still intercept requests based on specific keywords or patterns. This often happens when the model detects a potential violation of its core constraints, such as content involving minors. Understanding these triggers is the first step to ensuring your API calls succeed.

The model id uncensored indicates that the underlying weights are designed to be less restrictive. Yet, the inference engine may still apply a lightweight filter to prevent obvious violations. This is not a subscription-based restriction but a hard limit enforced by the service. You need to structure your input to minimize false positives.

Common triggers include specific combinations of gender and action words. For example, a prompt might be refused if it appears to describe a minor in a certain context. To troubleshoot this, you can try rephrasing the subject or adding explicit context to clarify the nature of the interaction. This helps the model distinguish between a refusal-worthy scenario and a permissible one.

It is important to note that the service never claims to have zero refusals. The hard content limit ensures that no sexual content involving minors is generated. If your prompt falls into this category, the model will refuse it regardless of the uncensored setting. This is a feature, not a bug, designed to keep the service compliant and usable.

Addressing Gender-Based Refusals

Reddit discussions often highlight issues where the model refuses prompts based on gender. Users report that changing a subject from male to female can trigger a refusal, even if the content is identical. This is a known behavior in some uncensored models, where the safety filter is more sensitive to certain gender combinations.

To mitigate this, you can try swapping the gender in your prompt to see if it resolves the issue. If the model refuses the female version but accepts the male version, you can use the male version as a workaround. This is a practical tip for developers who need consistent output regardless of the subject's gender.

Another approach is to add more context to the prompt. By providing additional details about the scene or the characters, you can help the model understand the context better. This can reduce the likelihood of a false positive refusal. For example, specifying that the scene is fictional or part of a research study can help.

It is also worth noting that the model's behavior can vary based on the specific version of the weights. If you are using a hosted API, the underlying model may be updated periodically. Keeping an eye on the model's performance and adjusting your prompts accordingly is a good practice.

Optimizing Prompt Structure for Uncensored Output

One effective way to reduce refusals is to optimize the structure of your prompts. Instead of using direct or explicit language, you can use more descriptive or indirect phrasing. This can help the model interpret the intent of the prompt more accurately.

For instance, instead of using a specific keyword that might trigger a filter, you can use a synonym or a related phrase. This can help bypass the safety filter while still conveying the same meaning. It is a simple but effective technique that can improve the success rate of your API calls.

Another strategy is to use a system prompt that sets the tone for the conversation. By explicitly stating that the model should be uncensored and open to all topics, you can influence its behavior. This can help reduce the likelihood of refusals, especially for controversial or adult content.

Finally, you can experiment with different parameters such as temperature and top_p. Adjusting these values can change the model's output style and potentially reduce refusals. A higher temperature can make the model more creative and less likely to stick to safe patterns.

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 every use case. If you need image, audio, or video generation, our service does not support these capabilities. You would need to look for a different provider that offers multimodal outputs.

Additionally, if you require fine-tuning or model routing, our API does not support these features. The model id uncensored is fixed, and you cannot train a custom model or route requests to different models. This is a limitation of the current service architecture.

If you need embeddings or OCR, our API does not provide these services. You would need to integrate a separate service for these tasks. This is important to consider if your application relies on these specific capabilities.

Finally, if you need a subscription-based model with monthly fees, our prepaid credit system may not fit your budgeting needs. Our service charges $0.15 per 1M input tokens and $0.50 per 1M output tokens, with no monthly fee. This is a different pricing model than what some users might be accustomed to.

Managing Token Usage and Costs

Understanding token usage is important for managing costs with our API. The context window is 100,000 tokens, which includes both the prompt and the completion. You need to be mindful of the token count to avoid exceeding your prepaid credit.

The pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free, which can help reduce costs. You can top up your credit using crypto, with a minimum of $20 and a maximum of $500. Bonus credit is available for larger top-ups.

To estimate your costs, you can use the formula: (tokens divided by 1,000,000) times the per-million price. This helps you budget for your API usage. It is also important to monitor your usage to ensure you do not run out of credit unexpectedly.

If you exceed the rate limit of 300 requests per minute, you will receive a 429 error. This can disrupt your application if not handled properly. You can implement retry logic to handle these errors gracefully.

Integrating with Your Application

Integrating our API into your application is straightforward. You can use the standard OpenAI-compatible endpoints, such as POST /v1/chat/completions. This makes it easy to switch between different providers if needed.

You can sign up with Google or email and password. The API key is shown immediately, allowing you to start using the service right away. There is no need to provide a credit card for the trial, which includes $0.50 of credit.

You can also use streaming over SSE for real-time responses. This is useful for applications that require immediate feedback. The usage information is included in the last chunk, so you can track your token usage in real-time.

Function calling and JSON mode are also supported. This allows you to integrate the API into more complex workflows. You can specify parameters such as temperature, top_p, and stop sequences to customize the output.

Troubleshooting Common Errors

If you encounter a 401 error, it means your API key is invalid. Check that you are using the correct key and that it has not been revoked. You can generate a new key from your dashboard if needed.

A 402 error indicates that you have no credit. You can top up your account using crypto to resolve this. The service does not accept cards, PayPal, or bank transfers, so you need to have a crypto wallet.

A 429 error means you have exceeded the rate limit of 300 requests per minute. You can implement retry logic to handle this error. It is also a good idea to monitor your usage to avoid hitting the limit too frequently.

If you are unsure about the cause of an error, you can check the API documentation for more details. The service provides clear error codes to help you diagnose issues. You can also contact support if you need further assistance.

Frequently asked questions

Why does my prompt get refused even with an uncensored model?

Residual safety filters may still intercept requests based on specific keywords or patterns. You can try rephrasing the subject or adding explicit context to clarify the nature of the interaction.

How do I avoid gender-based refusals?

You can try swapping the gender in your prompt to see if it resolves the issue. Adding more context to the prompt can also help the model understand the context better.

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. You need to be mindful of the token count to avoid exceeding your prepaid credit.

How can I top up my credit?

You can top up your credit using crypto, with a minimum of $20 and a maximum of $500. The service accepts USDT on TRC20 or USDC on Base.