EN ▾
Get API keyapi.wanuncensored.top/v1

Troubleshooting Wan Uncensored API: Safety & Common Errors

Developers building adult content pipelines often face challenges with rate limits and unexpected filters. This guide explains how to troubleshoot common API errors and manage request safety effectively.

Understanding API Error Codes

When integrating the wanuncensored.top API, developers encounter specific HTTP status codes that indicate the state of their requests. The most common errors include 401 for an invalid key, 402 when there is no credit left, and 429 when the rate limit is exceeded. These codes provide clear signals about what needs to be adjusted in your integration logic.

A 401 error typically means the API key sent in the header is incorrect or missing. Developers should verify their key immediately after signup, as the key is shown immediately upon creation. It is important to store this key securely and ensure it is passed correctly in every request to avoid unnecessary authentication failures.

The 402 error indicates that the prepaid credit has been exhausted. Since this service operates on a prepaid model with no monthly subscription, accounts will stop working once the balance reaches zero. Errors and refusals are free, so developers do not lose credit for failed requests, only for successful token consumption.

The 429 rate limit error occurs when more than 300 requests are made per minute per key. This limit is strict and applies to the entire key, not just individual endpoints. Developers should implement exponential backoff strategies in their code to handle these temporary blocks gracefully without overwhelming the server.

Managing Rate Limits and Throughput

The API enforces a limit of 300 requests per minute per key. This constraint is important for developers building high-throughput applications or chatbots that generate frequent responses. Exceeding this limit results in a 429 error, which pauses further processing until the window resets.

To manage this limit effectively, developers should batch their requests or implement a queueing system in their backend. This ensures that requests are spaced out evenly over the minute, preventing sudden spikes that could trigger the rate limit. Monitoring the usage in the last chunk via Server-Sent Events can also help track real-time consumption.

It is also worth noting that the limit applies per key, not per user or per IP address. If a developer generates multiple keys, each key has its own 300 requests per minute allowance. This allows for scaling by distributing load across multiple keys, provided the cost per token remains within budget.

Since the API is uncensored and handles adult content, high-volume usage is common. Developers should test their integration under load to ensure that the rate limit handling is reliable. Implementing retries with delays can prevent data loss during temporary spikes in traffic.

Handling Content Safety and Refusals

While the model is described as uncensored, it does have a hard content limit regarding sexual content involving minors. Requests that trigger this specific filter are refused by the API. This is a key distinction from fully uncensored models that might allow any topic.

Developers should design their input sanitization layers to check for minor-related content before sending requests to the API. This can reduce the number of refused requests and save on token usage, as refused requests do not consume credit. However, since refusals are free, the primary benefit is smoother user experience and consistent content delivery.

The model does not refuse lawful adult, fictional, security-research, or controversial topics. This makes it suitable for adult pipelines where creative freedom is prioritized. However, the minor content filter is strict, so developers must ensure their prompts do not inadvertently trigger this refusal.

When a refusal occurs, the API returns a specific response indicating the filter was hit. Developers should handle this gracefully in their application, perhaps by prompting the user to adjust their input or by logging the event for further analysis. Understanding this limit helps in setting realistic expectations for content generation.

Pricing and Credit Management

The pricing model is straightforward: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and charged by real token usage. Errors and refusals are free, which is a significant advantage for developers testing different prompts or handling high volumes of requests.

Top-ups are available in crypto only, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. Credits never expire, so developers can top up when prices are favorable or when they anticipate high usage. There are no monthly fees or subscriptions, making it easy to control costs.

New accounts receive $0.50 of trial credit, allowing developers to test the API without immediate payment. This trial credit is sufficient for a small number of requests, helping users verify the integration before committing to a larger top-up.

Since the API is uncensored and handles adult content, token usage can vary significantly depending on the complexity of the prompts and the length of the responses. Developers should monitor their token usage to ensure they do not run out of credit unexpectedly. The prepaid model allows for precise budgeting and cost control.

When This API Is Not the Right Choice

This API is designed for text-only interactions. It does not support image, audio, video generation, embeddings, OCR, fine-tuning, or model routing. If your project requires generating images or videos based on text prompts, this API will not be sufficient on its own.

For example, if you are building a character generator that sends pictures and videos at request, as discussed in threads on r/CharacterAIrevolution, you will need to integrate this text API with other tools or services that handle media generation. The text API can generate the character descriptions, but you will need a separate solution for the visual output.

Additionally, if you need real-time translation or speech-to-text capabilities, this API does not provide those features. Developers looking for a comprehensive solution that handles multiple modalities out of the box might find this API limited. It is best suited for projects that focus on text-based interactions and uncensored content generation.

Furthermore, if you require a service with an SLA guarantee or certifications like SOC2 or HIPAA, this independent service does not offer those. It is ideal for indie builders and developers who prioritize flexibility and uncensored content over enterprise-grade guarantees.

Integrating with Adult Content Pipelines

Developers building adult content pipelines often use this API for its uncensored nature. The model does not refuse lawful adult, fictional, or controversial topics, making it ideal for creative writing, chatbots, and role-playing applications.

To integrate this API effectively, developers should focus on prompt engineering. Since the model is uncensored, prompts can be more direct and detailed. However, the minor content filter must be respected, so prompts should avoid references to minors in a sexual context.

Streaming over Server-Sent Events (SSE) is supported, allowing for real-time text generation. This is useful for chat applications where users expect immediate feedback. The usage information is included in the last chunk, which helps in tracking token consumption in real-time.

Function calling and JSON mode are also supported, enabling developers to structure the output in a specific format. This is particularly useful for applications that need to parse the response and use it in downstream processes. The ability to set parameters like temperature, top_p, and stop sequences allows for fine-tuning the response style.

Common Troubleshooting Steps

If you encounter issues with the API, start by checking the error codes. A 401 error means the key is invalid, while a 402 error indicates no credit. A 429 error suggests you have hit the rate limit. These are the most common issues developers face.

Ensure that your API key is correctly passed in the header. A common mistake is forgetting to include the key or using an old key. Verify the key immediately after signup and store it securely.

If you are hitting the rate limit, consider implementing a queueing system or distributing requests across multiple keys. This ensures that your application can handle high volumes of requests without interruption.

Finally, check the content of your prompts. If you are getting unexpected refusals, it might be due to the minor content filter. Adjust your prompts to avoid triggering this filter and ensure a smoother experience for your users.

Frequently asked questions

What happens if I run out of credit?

The API will return a 402 error. You can top up your credit using USDT on TRC20 or USDC on Base. Credits never expire, so you can add funds whenever you need to.

Does the API support image generation?

No, this API is text-only. It does not support image, audio, video, or other media generation. You will need to use a separate service for those capabilities.

How do I handle rate limits?

The limit is 300 requests per minute per key. You can implement exponential backoff or distribute requests across multiple keys to manage this limit effectively.

Is there a free trial?

Yes, every new account gets $0.50 of trial credit. No card is needed to sign up, and you can test the API immediately.