EN ▾
Get API key

Troubleshooting NSFW API Filters and Reliability

Developers often struggle with inconsistent outputs when integrating uncensored language models into automated workflows. This guide addresses common issues like guardrail leakage and context window limits, offering practical steps to maintain reliability in NSFW applications.

Server rack with glowing blue lights and floating digital tokens representing API usage

Understanding Uncensored vs. Uncapped Filters

Many developers assume that an uncensored model will never refuse a request, but this is not entirely true. Our API serves a single open-weight text model that does not refuse lawful adult, fictional, security-research, or controversial topics. However, there is a hard content limit regarding sexual content involving minors. Requests containing such content are refused, regardless of the model's uncensored nature. This distinction is important for developers building automated platforms that process user-generated content.

When troubleshooting blocked requests, first check if the refusal is due to the hard content limit or a temporary filter glitch. The model itself is designed to be permissive, so consistent refusals on standard adult content may indicate an issue with your prompt structure or the specific version of the model being served. Always verify that your content falls within the allowed scope of lawful adult themes.

Another common issue is guardrail leakage, where external tools or wrappers impose their own filters on top of the API response. If you are using a third-party service to route requests, ensure that the uncensored flag is passed correctly. The API itself does not add external guardrails, so any filtering you see likely comes from the client side or the integration layer.

To maintain consistency, test your prompts with a variety of adult themes to identify the specific boundaries of the model. Document which prompts succeed and which fail to build a reliable dataset for your application. This helps in debugging issues that arise from edge cases in content generation.

Managing the 100,000 Token Context Window

The API supports a context window of 100,000 tokens, which includes both the prompt and the completion. This large window allows for long conversations and complex instructions, but it also introduces challenges in managing memory. If your application sends very long prompts, you may reach the limit quickly, causing the model to forget earlier parts of the conversation.

To troubleshoot context loss, monitor the token usage in your requests. The API charges for input and output tokens separately, with input tokens costing $0.15 per million and output tokens costing $0.50 per million. By tracking token usage, you can optimize your prompts to stay within the limit while maintaining performance.

If you notice that the model forgets important details in long sessions, consider breaking the conversation into smaller chunks. You can use the function calling feature to manage state externally, storing key information in your own database and feeding it back into the prompt as needed. This approach ensures that the model has access to the most relevant information without consuming too much of the context window.

Additionally, use the seed parameter to ensure reproducibility in your tests. By setting a specific seed, you can control the randomness of the model's responses, making it easier to debug and verify that the model is responding consistently to the same input.

Handling Rate Limits and Errors

The API has a limit of 300 requests per minute per key. If you exceed this limit, you will receive a 429 rate limit error. To troubleshoot this, implement exponential backoff in your application to retry requests after a short delay. This helps prevent overwhelming the API and ensures that your application can handle bursts of traffic gracefully.

Other common errors include 401 for invalid keys and 402 for insufficient credit. Ensure that your API key is correctly configured and that you have enough prepaid credit to cover your usage. The API charges by real token usage, so errors and refusals are free, but successful requests will consume credit. Keep an eye on your credit balance to avoid unexpected service interruptions.

If you are experiencing frequent 402 errors, consider increasing your prepaid credit or optimizing your token usage. You can top up your credit using crypto, with USDT on TRC20 or USDC on Base, in amounts ranging from $20 to $500. Bonus credit is available for top-ups of $50 or more, which can help you save on costs.

Regularly check your API key and credit balance to ensure smooth operation. If you encounter persistent errors, contact support for assistance in diagnosing the issue.

Optimizing with Streaming and Function Calling

Streaming over Server-Sent Events (SSE) allows you to receive responses in real-time, which can improve the user experience in chat applications. The usage information is included in the last chunk, so you can track token consumption as the response is generated. This is particularly useful for long responses where you want to display partial results to the user.

Function calling, or tools, enables the model to interact with external systems by returning structured data. This feature is essential for building automated workflows that require the model to perform specific actions, such as querying a database or triggering an event. By using function calling, you can extend the capabilities of the model beyond simple text generation.

JSON mode ensures that the model's output is valid JSON, making it easier to parse and integrate with your application. This is particularly useful when you need to send structured data to other services or store it in a database. Always validate the JSON output to ensure it meets your application's requirements.

Parameters like temperature, top_p, stop, and penalties allow you to fine-tune the model's behavior. Adjusting these parameters can help you achieve the desired level of creativity and consistency in the model's responses. Experiment with different settings to find the optimal configuration for your use case.

When This API Is Not the Right Choice

While our API is designed for uncensored text generation, it may not be the right choice for all projects. If your application requires image, audio, or video generation, this API will not suffice, as it only supports text input and output. Similarly, if you need embeddings, OCR, or fine-tuning capabilities, you will need to look for a different provider.

The API does not support model routing, meaning you cannot switch between different models dynamically. If your project requires the flexibility to use multiple models for different tasks, this API may not meet your needs. Additionally, the API does not offer an on-prem deployment option, so if data privacy is a critical concern, you may need to consider a self-hosted solution.

If you are looking for a provider with a free unlimited tier or specific SLA guarantees, this API may not be the best fit. The API offers prepaid credit with no monthly fee, but you will need to pay for token usage. Ensure that your budget and requirements align with the API's pricing model and features before integrating it into your application.

Finally, if you need a provider with named customers or benchmark scores, this API may not provide the level of transparency you require. The API focuses on providing a reliable, uncensored text model without claiming specific certifications or performance metrics. Evaluate your project's needs carefully to determine if this API is the right fit.

Addressing Common Developer Questions

Developers often ask why their uncensored API calls still get blocked or why models forget context in long sessions. These issues are common in automated video processing platforms and NSFW chatting applications. Users report that guardrails can be inherent to the model, and API responses may be more strict than expected in some cases.

Another common question is about the reliability of the API for generating sexual content from images. While the API is uncensored, it does not handle image-to-video generation directly. Developers using tools like Brainbaby for image-to-video tasks may find that the API complements these tools by providing the text-based uncensored content needed for the video scripts or descriptions.

Users also discuss the difference between censorship and model quality. Some note that newer models may have different behaviors compared to older versions, affecting the user experience. It is important to test the model with your specific use case to ensure it meets your quality standards.

Finally, developers ask about the best way to manage credit and rate limits. Using prepaid credit and monitoring token usage can help avoid unexpected costs and service interruptions. By understanding these common issues, you can better troubleshoot and optimize your integration with the API.

Best Practices for Integration

To ensure a smooth integration with the API, follow these best practices. First, always use the correct endpoint for your needs. The API supports POST /v1/chat/completions for standard chat completions, POST /v1/responses for responses, and GET /v1/models to check available models. Using the correct endpoint ensures that your requests are processed correctly.

Second, implement proper error handling to manage rate limits and other errors. Use exponential backoff for rate limit errors and check your credit balance regularly to avoid 402 errors. This helps maintain the reliability of your application and prevents service disruptions.

Third, optimize your prompts to stay within the context window limit. Use function calling and JSON mode to manage state and structure your outputs effectively. This reduces the risk of context loss and ensures that the model has access to the most relevant information.

Finally, stay updated with the API's features and limitations. The API does not support embeddings, image generation, or fine-tuning, so ensure that your project does not rely on these features. By following these best practices, you can maximize the benefits of the API and build a reliable, uncensored text generation system.

Frequently asked questions

Why does the uncensored model still refuse some requests?

The model has a hard content limit on sexual content involving minors. Requests containing such content are refused, even though the model is otherwise uncensored for lawful adult topics.

How do I manage the 100,000 token context window?

Monitor your token usage and consider breaking long conversations into smaller chunks. Use function calling to manage state externally and feed relevant information back into the prompt to prevent memory loss.

What happens if I exceed the rate limit?

You will receive a 429 rate limit error. Implement exponential backoff in your application to retry requests after a short delay, ensuring graceful handling of traffic bursts.

Can I use this API for image or video generation?

No, the API only supports text input and output. It does not offer image, audio, or video generation capabilities. You may need to combine it with other tools for multimedia tasks.