EN ▾
Start now

Troubleshooting Glmnsfw: Safety and Risk Management

Developers often worry about content filtering and API reliability when building NSFW applications. This guide addresses safety risks, common integration pitfalls, and how to choose the right approach for handling uncensored text output without overpromising features like image generation.

Server rack with glowing data streams and digital shields symbolizing API security and reliability

Understanding Content Limits and Refusals

When integrating an uncensored model, it is important to understand what "uncensored" actually means for your application. Our API serves an uncensored open-weight text model that does not refuse lawful adult, fictional, security-research, or controversial topics. This means the model will generate content that other providers might filter out, giving you more control over the narrative or data output.

However, there is one hard content limit: no sexual content involving minors. Requests that violate this rule are refused by the API. This is the only explicit refusal mechanism in place. Everything else, from dark fantasy to explicit adult themes, is passed through. This simplicity reduces the complexity of handling multiple layers of filtering logic in your backend.

It is important to note that the model does not have built-in image, audio, or video generation capabilities. It is a text-in, text-out service. If your application requires visual content, you will need to handle that separately. The API focuses solely on generating high-quality text responses based on your prompts and parameters.

When designing your application, you should account for the possibility of refusals due to the minor content limit. You can check the response status and handle these cases gracefully. This ensures a smooth user experience even when the model decides to decline a specific request. The refusal is free, so you are not charged for these attempts.

Handling API Errors and Rate Limits

Reliability is key when building a chat application. Our API provides clear error codes to help you debug issues. A 401 error indicates an invalid key, which means you should check your API key configuration. A 402 error means you have no credit left, and a 429 error indicates you have hit the rate limit of 300 requests per minute per key.

Rate limits are a common concern for developers. If you exceed 300 requests per minute, the API will return a 429 error. You can implement exponential backoff in your client code to handle these retries automatically. This prevents your application from overwhelming the server and ensures a stable experience for your users.

Errors and refusals are free, which is a significant advantage for testing and development. You can experiment with different prompts and parameters without worrying about burning through your prepaid credit. This allows you to optimize your usage and reduce costs over time.

It is also important to monitor your credit balance. Since credit is charged by real token usage, you can track your spending accurately. The prepaid credit never expires, so you can top up whenever you need more. This flexibility allows you to manage your budget effectively without the pressure of monthly subscriptions.

Optimizing Output with Parameters

The API supports several parameters to control the output of the model. You can use temperature to adjust the creativity of the responses. A higher temperature produces more diverse and creative outputs, while a lower temperature produces more focused and deterministic results. This is useful for fine-tuning the tone of your application.

Top_p and stop sequences are also available. Top_p controls the diversity of the output by limiting the probability mass of the next token. Stop sequences allow you to define specific strings that signal the end of a response. This is helpful for controlling the length of the output and ensuring it fits your application's format.

Seed values allow you to reproduce specific outputs. This is useful for testing and debugging, as you can ensure that the model generates the same response for the same input. This consistency is valuable for quality assurance and ensuring that your application behaves predictably.

Penalties can be used to discourage certain words or phrases in the output. This gives you more control over the content generated by the model. You can use these parameters to tailor the output to your specific needs, if you are building a chatbot, a story generator, or a data extraction tool.

Managing Credit and Payments

Our API uses a prepaid credit system, which means you pay only for what you use. There are no monthly subscriptions or hidden fees. The credit is charged based on real token usage, with a price of $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This transparent pricing model allows you to budget effectively.

Top-ups are available in crypto only, specifically USDT on TRC20 or USDC on Base. You can add any whole amount from $20 to $500. If you top up $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus credit is a great way to maximize your value and get more output for your investment.

When you sign up, you get $0.50 of trial credit, which allows you to test the API without needing to add a card or make a payment. This is a great way to evaluate the model's performance and see if it fits your needs before committing to a larger top-up.

The prepaid credit never expires, so you can top up whenever you need more. This flexibility allows you to manage your budget effectively without the pressure of monthly subscriptions. You can also track your usage and adjust your top-ups accordingly to ensure you always have enough credit for your applications.

Integrating Streaming and Function Calling

Streaming over Server-Sent Events (SSE) is a powerful feature for real-time applications. It allows you to receive responses as they are generated, providing a smoother and more responsive user experience. The usage information is included in the last chunk, so you can track your token consumption in real-time.

Function calling, also known as tool use, allows the model to call external functions and return structured data. This is useful for integrating with other services or databases. You can define the functions your application supports, and the model will use them to gather information or perform actions.

JSON mode ensures that the output is valid JSON, which makes it easier to parse and process. This is particularly useful for applications that require structured data, such as chatbots that need to return specific formats. You can also use the seed parameter to reproduce specific outputs for testing.

When integrating these features, it is important to handle errors and edge cases gracefully. For example, if a function call fails, you should have a fallback mechanism to handle the error. This ensures that your application remains stable and reliable, even when unexpected issues arise.

When This API Is Not the Right Choice

While our API is excellent for text generation, it may not be the right choice for every project. If you need image, audio, or video generation, this API will not meet your needs. It is a text-only service, so you will need to find another solution for multimedia content.

Similarly, if you require embeddings, OCR, or fine-tuning, this API does not support these features. You will need to look for a provider that offers these capabilities. Our API focuses on high-quality text output, so it is best suited for applications that rely on natural language processing.

If you need model routing, where the API automatically selects the best model for a given task, this service does not offer that feature. You will need to manage the model selection yourself. This gives you more control but requires more effort on your part.

Finally, if you need a guaranteed SLA or certifications like SOC2 or HIPAA, this independent service may not be the best fit. Our API is designed for flexibility and cost-effectiveness, but it does not offer the same level of enterprise-grade guarantees. Always check the specific requirements of your project before deciding.

Addressing Common Developer Concerns

Developers often ask about the reliability of uncensored models and how to handle content filtering. The key is to understand that our model does not refuse lawful adult topics, which gives you more control over the output. However, you should still implement your own safety layers if needed, especially for public-facing applications.

Another common question is about rate limits. The API allows 300 requests per minute per key, which is generous for most use cases. If you need higher throughput, you can use multiple keys or implement a queuing system to manage the load. This ensures that your application remains responsive even during peak usage.

Security is also a major concern. Since the API is uncensored, you may need to implement additional checks to ensure that the content meets your standards. This can include post-processing filters or human review for critical applications. The model itself does not enforce these rules, so it is up to you to manage them.

Finally, developers often ask about the cost of using the API. With prepaid credit and no monthly fees, you can control your spending effectively. The bonus credit for larger top-ups also helps reduce costs. By monitoring your usage and optimizing your prompts, you can maximize the value of your investment.

Frequently asked questions

Does the API support image generation?

No, the API is text-only. It does not support image, audio, or video generation. You will need to use a separate service for multimedia content.

What happens if I hit the rate limit?

If you exceed 300 requests per minute, the API returns a 429 error. You can implement exponential backoff to handle retries automatically.

Is there a monthly subscription fee?

No, there is no monthly subscription. You pay only for the tokens you use, with prepaid credit that never expires.

Can I get a bonus when I top up?

Yes, top-ups of $50 or more receive a bonus credit ranging from 5% to 15%. This helps you get more output for your investment.