EN ▾
Get API key

Troubleshooting FluxNSFW API Errors and Limits

Developers often face unexpected failures when integrating uncensored language models. This guide explains how to handle authentication, credit, and rate limits for the uncensored text API. We cover common error codes and practical steps to keep your application running smoothly.

A sleek server rack with glowing blue lights representing a secure text generation API in a dark digital space.

Understanding Authentication and Key Errors

When you first integrate the API, the most common issue involves authentication. The system returns a 401 status code when the provided key is invalid or missing. This often happens if you copy the key incorrectly during the signup process. Remember that the key is shown immediately after you sign up with Google or email and password. If you lose the key, you may need to generate a new one from your dashboard.

It is important to store your API key securely in your environment variables. Never hardcode the key directly into your application source files, especially if you are using a public repository. A leaked key can lead to unauthorized usage of your prepaid credit. Since the service uses prepaid credit, any unauthorized requests will deduct from your balance until the credit is exhausted.

Another common cause for 401 errors is using an outdated key. If you regenerate your key, the old one may no longer work immediately depending on your session settings. Always ensure you are using the most recent key in your API calls. The base URL for these requests is https://api.fluxnsfw.top/v1, and using the wrong endpoint can also lead to connection issues.

Keep in mind that the API is uncensored, meaning it does not refuse lawful adult or controversial topics. However, it does have a hard limit on sexual content involving minors. If you send a request that violates this specific rule, the model will refuse the response. This is not an authentication error but a content filter trigger. Understanding this distinction helps you troubleshoot why a request might fail without returning a standard error code.

Managing Credit and Payment Issues

The second most frequent error is 402, which indicates that you have no credit left. Unlike many other services, this API does not offer a free unlimited tier or a monthly subscription. You must purchase credit using cryptocurrency. The system charges by real token usage, so errors and refusals are free, but successful generations cost money. If you see a 402 error, you need to top up your account immediately.

Top-ups are accepted only in crypto, specifically USDT on TRC20 or USDC on Base. You can add any whole amount between $20 and $500. If you add $50 or more, you receive bonus credit ranging from 5% to 15%. There are no cards, PayPal, or bank transfers accepted. If you try to use a non-crypto payment method, the transaction will fail, and you will not receive credit.

Paid credit never expires, so you can top up whenever you like. However, you cannot use credit from one account on another. Each account is tied to a specific email or Google login. If you switch devices or clear your browser cookies, you might lose access to your balance if you are not logged in. Always ensure you are logged into the correct account before making API calls.

It is also worth noting that the trial credit of $0.50 is given to every new account. This allows you to test the API without immediate payment. However, the trial credit is limited, and you will need to purchase more to continue usage. Keep track of your token usage to avoid unexpected 402 errors during critical operations. The price is $0.15 per million input tokens and $0.50 per million output tokens.

Handling Rate Limits and Throttling

The third major error is 429, which signals that you have hit the rate limit. The API allows 300 requests per minute per key. If you exceed this limit, your subsequent requests will be rejected until the window resets. This is important for applications that make bulk requests or have high traffic. You should implement exponential backoff in your code to handle these errors gracefully.

Rate limits apply to the entire key, not just specific endpoints. This means that calls to /v1/chat/completions, /v1/responses, and /v1/models all count towards the same limit. If you are using multiple keys, each key has its own 300 requests per minute allowance. You can distribute your load across multiple keys to increase throughput, but each key is still subject to the same per-minute limit.

It is important to monitor your request frequency, especially during streaming. Streaming over SSE (Server-Sent Events) can generate many small requests. If you are not careful, you might accidentally exceed the limit by sending too many rapid-fire requests. Use a queue or a throttle mechanism in your application to smooth out the request rate. This ensures that you stay within the 300 requests per minute boundary.

If you consistently hit the rate limit, consider optimizing your prompts. Using a smaller context window or reducing the output length can help reduce the number of tokens processed. This does not increase the request limit, but it can help you manage your credit more efficiently. Remember that the context window is 100,000 tokens, so you have plenty of room for long conversations without hitting token limits.

Common Content and Model Behaviors

Since this is an uncensored model, you might encounter responses that seem unexpected or off-topic. The model does not refuse lawful adult, fictional, or security-research topics. However, it may refuse requests involving sexual content with minors. This is a hard limit enforced by the model. If you send a prompt that triggers this filter, the model will return a refusal. This is not an error in the API itself but a feature of the model.

The model supports various parameters such as temperature, top_p, stop, seed, and penalties. These parameters allow you to control the creativity and determinism of the responses. If you are getting inconsistent results, try adjusting the temperature or setting a seed. Using a seed ensures that the same input produces the same output, which is useful for debugging. The API also supports function calling and JSON mode, which can help structure your responses.

It is important to note that the API serves only text. There is no image, audio, or video generation. If you are looking for a model that can generate images, this API is not the right choice. The model is an open-weight text model, and it responds to text input with text output. If you need embeddings, OCR, or fine-tuning, you will need to use a different service.

When troubleshooting content issues, check your prompt for any triggers that might cause a refusal. If the model refuses a request, it is usually due to the hard content limit. You can try rephrasing your prompt to avoid triggering the filter. However, keep in mind that the model is uncensored, so it should accept most lawful topics. If you are still getting refusals, check the model's specific behavior for your topic.

When This API Is Not the Right Choice

While this API is excellent for uncensored text generation, it is not suitable for every use case. If you need image generation, audio processing, or video creation, this service will not meet your needs. The API is strictly for text input and text output. It does not support embeddings, OCR, or fine-tuning. If your application requires these features, you should look for a different provider.

Additionally, if you need a service with a Service Level Agreement (SLA) or certifications like SOC2 or HIPAA, this API may not be the best fit. The service does not claim any specific uptime guarantees or certifications. It is an independent service focused on providing uncensored text generation. If you need enterprise-grade reliability or compliance, you should verify the provider's current offerings.

Another limitation is the payment method. The API only accepts crypto payments, specifically USDT on TRC20 or USDC on Base. If you prefer to pay with a credit card, PayPal, or bank transfer, this service might not be convenient for you. You also cannot use invoices for payment. If you need flexible payment options, you might want to consider other providers.

Finally, if you need a model that can route between different models or perform advanced search, this API is not designed for that. It serves a single uncensored open-weight text model. There is no model routing or search capability. If your application requires dynamic model selection or search functionality, you should look for a more versatile platform. This API is best suited for developers who need simple, uncensored text generation with predictable costs.

Integrating with Your Application

Integrating the 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 use existing libraries and SDKs. The API supports streaming over SSE, which allows you to receive responses in real-time. This is useful for chat applications where you want to display text as it is generated.

You can also use the /v1/responses endpoint for more structured responses. The API supports JSON mode, which ensures that the output is valid JSON. This is helpful for applications that need to parse the response programmatically. You can also use function calling to allow the model to call specific functions in your application. This enables more complex interactions and automation.

When integrating, make sure to handle errors properly. If you receive a 401, 402, or 429 error, you should implement logic to handle these cases. For example, if you get a 402 error, you might want to prompt the user to top up their credit. If you get a 429 error, you should wait and retry the request. Proper error handling ensures that your application remains reliable and user-friendly.

It is also important to test your integration thoroughly. Use the trial credit to test different prompts and parameters. Check how the model handles edge cases, such as long inputs or unusual topics. Make sure your application can handle the model's responses correctly. If you encounter any issues, refer to the API documentation for more details on the available parameters and endpoints.

Best Practices for Uncensored Text Generation

To get the best results from the uncensored model, it is important to craft your prompts carefully. Since the model does not refuse lawful adult or controversial topics, you can experiment with a wide range of themes. However, you should avoid prompts that trigger the hard content limit for sexual content involving minors. This ensures that your requests are processed without refusal.

Use the available parameters to control the output. Adjust the temperature to change the creativity of the responses. Use top_p to limit the diversity of the output. Set a seed to get consistent results. Use the stop parameter to control where the model stops generating text. These parameters give you fine-grained control over the model's behavior.

Monitor your token usage to manage your credit effectively. The API charges $0.15 per million input tokens and $0.50 per million output tokens. By optimizing your prompts and responses, you can reduce your costs. For example, using a smaller context window or reducing the output length can help you save credit. Keep track of your usage to avoid unexpected charges.

Finally, stay updated with the API's features and limitations. The service may update its model or add new features over time. Check the documentation regularly to ensure you are using the latest capabilities. Since the API is uncensored, you have a lot of freedom in how you use it. Just remember to respect the hard content limit and use the API responsibly.

Frequently asked questions

Why do I get a 401 error?

A 401 error means your API key is invalid or missing. Ensure you are using the correct key from your dashboard and that it has not been revoked. Check that you are using the correct base URL for your requests.

How do I top up my credit?

You can top up your credit using USDT on TRC20 or USDC on Base. The minimum amount is $20, and the maximum is $500. You can receive bonus credit if you add $50 or more.

What is the rate limit?

The rate limit is 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. You can use multiple keys to increase your throughput, as each key has its own limit.

Does the API support image generation?

No, the API serves only text. It does not support image, audio, or video generation. It is designed for uncensored text generation with text input and text output.