Troubleshooting Wan API Errors & Safety Limits
Developers integrating with our API often encounter specific error codes and safety refusals. This guide explains how to interpret 401, 402, and 429 responses, adjust request parameters, and understand the hard content limits that govern uncensored text generation.

Understanding Common Error Codes
When integrating with our API, you will encounter specific HTTP status codes that indicate the state of your request. The most common errors are 401, 402, and 429. A 401 Unauthorized error means your API key is invalid or missing. You must ensure you are sending the correct key in the Authorization header. A 402 Payment Required error indicates that your prepaid credit has been exhausted. Since we charge by real token usage, you must top up your account to continue making requests. A 429 Too Many Requests error occurs when you exceed the rate limit of 300 requests per minute per key. This limit is enforced to ensure stable service for all users.
It is important to handle these errors gracefully in your application. For 401 errors, verify your key in the dashboard. For 402 errors, prompt the user to add funds. For 429 errors, implement exponential backoff in your retry logic. This prevents overwhelming the server during peak usage. Remember that errors and refusals are free, so you do not lose credit when these errors occur. This allows you to test your integration without financial risk.
Always check the response body for detailed error messages. The API provides clear explanations for each error code. This helps you diagnose issues quickly. For example, a 429 error might include the time until the rate limit resets. Use this information to adjust your request frequency. Proper error handling ensures a smooth experience for your users. It also helps you maintain a stable connection with the API.
Keep in mind that the API is designed for text generation only. If you encounter unexpected errors, check your request format. Ensure you are using the correct endpoints and parameters. The API supports POST requests for chat completions and responses. It also supports GET requests for listing models. Always refer to the documentation for the correct syntax. This will help you avoid common integration mistakes.
Handling Rate Limits and Retry Logic
The API enforces a strict limit of 300 requests per minute per key. This limit is designed to prevent abuse and ensure fair usage. If you exceed this limit, you will receive a 429 error. To handle this, implement a retry mechanism with exponential backoff. This means you wait longer between each retry attempt. For example, wait one second, then two, then four, and so on. This prevents your application from flooding the server with requests.
You can also monitor your usage to stay within the limit. Track the number of requests you make per minute. If you approach the limit, slow down your request frequency. This is especially important for batch processing or high-volume applications. You can also use multiple API keys to distribute the load. Each key has its own rate limit, so using multiple keys can increase your overall throughput.
It is also important to handle 429 errors gracefully in your code. Do not just retry immediately, as this can worsen the situation. Instead, log the error and wait for the recommended backoff time. This shows respect for the server and helps maintain stability. You can also notify your users that the service is temporarily busy. This manages their expectations and reduces frustration.
Remember that the rate limit is per key, not per account. If you have multiple keys, each key has its own limit. This allows you to scale your application by adding more keys. However, be mindful of the total number of requests you make. Excessive usage can lead to temporary bans or account reviews. Always use the API responsibly and within the stated limits.
Safety Filters and Content Limits
Our API is uncensored, meaning it does not refuse lawful adult, fictional, security-research, or controversial topics. However, there is one hard content limit: sexual content involving minors. Requests containing such content will be refused. This is a strict rule that applies to all models and endpoints. You must ensure your prompts do not trigger this limit. If you send a request with prohibited content, the API will return a refusal.
It is important to understand the difference between uncensored and unrestricted. Uncensored means the model does not refuse based on opinion or style. Unrestricted might imply no limits at all. Our API is uncensored but has a hard limit on specific content. This ensures a safe environment for users while allowing for creative freedom. You can generate content on various topics, including politics, religion, and sexuality, as long as it does not involve minors.
To avoid refusals, review your prompts before sending them. Check for keywords or phrases that might trigger the safety filter. You can also test your prompts with a small batch of requests. This helps you identify any potential issues before scaling up. If you receive a refusal, check the error message for details. It might indicate which part of the prompt triggered the filter.
Remember that the safety filter is designed to protect users, not to censor creativity. You can still generate diverse and engaging content. Just be mindful of the hard limit. If you need to generate content that might be borderline, test it first. This ensures a smooth experience for your users. Always refer to the documentation for the latest safety guidelines.
Adjusting Request Parameters
The API supports various parameters to customize your requests. You can adjust the temperature, top_p, stop sequences, seed, and penalties. The temperature controls the randomness of the output. A higher temperature produces more creative and varied responses. A lower temperature produces more focused and deterministic responses. You can also set a seed to reproduce the same output multiple times.
The top_p parameter controls the diversity of the output. It limits the selection to the most likely tokens. A lower top_p value makes the output more predictable. A higher top_p value allows for more variety. The stop sequences allow you to define when the model should stop generating text. This is useful for controlling the length of the output. You can also set penalties to discourage certain tokens. This helps you avoid repetitive or unwanted content.
It is important to experiment with these parameters to find the best settings for your use case. Start with default values and adjust them based on the output. You can also use the seed parameter to reproduce specific outputs. This is useful for testing and debugging. Remember that changing parameters can affect the quality of the output. Always test your changes thoroughly before deploying them.
You can also use JSON mode to enforce a specific output format. This is useful for structured data extraction or API integrations. The model will output valid JSON that you can parse easily. This ensures consistency and reliability in your application. Always validate the output to ensure it meets your requirements. This helps you avoid errors in downstream processing.
When This API Is Not the Right Choice
While our API is powerful for text generation, it is not suitable for all use cases. If you need image, audio, or video generation, this API is not the right choice. It only serves text in and text out. If you need embeddings, OCR, or fine-tuning, you will need a different service. Our API is designed for conversational and generative text tasks. It does not support model routing or multi-modal outputs.
If you need real-time audio processing or video analysis, this API is not the right choice. It is optimized for text-based interactions. If you need to process large volumes of images or videos, you will need a dedicated service. Our API is best suited for applications that rely on text generation, such as chatbots, content creation, and data analysis. It is not designed for multimedia processing.
If you need a service with a guaranteed SLA or certifications like SOC2 or HIPAA, this API is not the right choice. We do not claim these certifications. If you need on-prem deployment, this API is not the right choice. It is a hosted service. If you need benchmark scores or named customers, this API is not the right choice. We focus on providing a reliable and uncensored text API.
If you need a free unlimited tier, this API is not the right choice. We charge by token usage. If you need a subscription model, this API is not the right choice. We use a prepaid credit system. Always evaluate your specific needs before choosing an API. Our API is ideal for developers who need a flexible and uncensored text solution. But it may not meet the needs of those requiring multi-modal or certified services.
Addressing Community Questions on Reddit
Users on Reddit often discuss various topics related to AI and pop culture. For example, threads on r/StarWars and r/PrequelMemes frequently mention Obi-Wan Kenobi and Anakin Skywalker. While these discussions are not directly related to our API, they reflect the kind of creative and controversial content that our uncensored model can handle. Users discuss casting decisions, character dynamics, and plot details. This shows that our API can generate content on a wide range of topics, including fictional universes and fan theories.
Another common topic is the concept of the 'chosen one' and the power dynamics between characters. Users debate who is stronger and how characters interact. This reflects the kind of nuanced and detailed content that our API can produce. You can use our API to generate similar discussions, analyze character traits, or even create new stories based on existing lore. The uncensored nature of the model allows for creative freedom in these areas.
Users also discuss the technical aspects of AI models, such as context windows and token limits. While our API has a 100,000 token context window, users on Reddit often discuss smaller models with shorter contexts. This highlights the importance of choosing the right tool for your needs. Our API is designed for long-context tasks, making it suitable for complex and detailed generation. Always consider the specific requirements of your project when selecting an API.
Finally, users often ask about the cost and availability of AI services. While our API offers prepaid credit with no monthly fee, users on Reddit might discuss subscription models from other vendors. It is important to compare options based on your specific needs. Our API is designed for flexibility and cost-effectiveness. Always check the documentation of other vendors for current prices and limits. This helps you make an informed decision about which API to use.
Best Practices for Integration
When integrating with our API, always use the correct endpoints. The main endpoint is POST /v1/chat/completions for chat completions. You can also use POST /v1/responses for alternative response formats. For listing models, use GET /v1/models. Always ensure you are sending the correct API key in the Authorization header. This prevents 401 errors and ensures your requests are authenticated.
Monitor your usage to stay within the rate limit. Implement retry logic with exponential backoff to handle 429 errors. This ensures your application remains stable even during peak usage. You can also use multiple API keys to distribute the load. This allows you to scale your application without hitting the rate limit. Always test your integration thoroughly before deploying it to production.
Use the parameters available to customize your requests. Adjust the temperature, top_p, and stop sequences to get the desired output. Use the seed parameter to reproduce specific outputs. This is useful for testing and debugging. Always validate the output to ensure it meets your requirements. This helps you avoid errors in downstream processing.
Finally, keep an eye on the safety filters. While our API is uncensored, it has a hard limit on sexual content involving minors. Ensure your prompts do not trigger this limit. If you receive a refusal, check the error message for details. This helps you adjust your prompts and avoid future refusals. Always refer to the documentation for the latest guidelines and best practices.
Frequently asked questions
What does a 429 error mean?
A 429 error means you have exceeded the rate limit of 300 requests per minute per key. You should implement exponential backoff and wait before retrying your request.
How do I top up my credit?
You can top up your credit using crypto only. We accept USDT on TRC20 or USDC on Base. The minimum amount is $20 and the maximum is $500.
Is there a free trial?
Yes, every new account gets $0.50 of trial credit. No credit card is needed to start using the API.
What content is refused?
The hard content limit is sexual content involving minors. All other lawful adult, fictional, or controversial topics are allowed.