Integrating Wan Uncensored: SDK Setup Checklist
Connecting your code to an uncensored text model requires precise configuration to avoid common pitfalls. This checklist ensures your SDK is set up correctly for the text-only endpoint, handling everything from authentication to token budgeting.

Understanding the Endpoint and Model ID
Before writing any code, you must understand the specific endpoint structure for this service. The API is hosted at https://api.wanuncensored.cc/v1. Unlike many other providers that might offer multiple models or complex routing, this service serves a single uncensored open-weight text model. You must explicitly send the model ID uncensored in your requests to ensure you are hitting the correct backend.
The API follows the OpenAI-compatible chat-completions format. This means if you are already using an SDK for another provider, you likely only need to change the base URL and the model identifier. The endpoints you will use are POST for /v1/chat/completions and POST for /v1/responses. A GET request to /v1/models is also available for verification purposes.
It is important to note that this is a text-in, text-out service. There are no embeddings, image generation, audio processing, or video capabilities. If your project requires multimodal inputs, you will need to handle those separately before sending the text to this API. Keeping your expectations aligned with these capabilities will prevent confusion during integration.
When initializing your client, ensure you point it to the correct base URL. Do not assume the standard OpenAI URL will work without modification. The base URL is unique to this service, and using the wrong endpoint will result in connection errors or unexpected responses. Double-check the URL in your environment variables to avoid costly debugging sessions later.
Authentication and Key Management
Authentication is handled via API keys, which are generated immediately upon signup. You can sign up using Google or an email and password combination. Once registered, your API key is shown immediately, so make sure to copy it securely before leaving the dashboard. This key is your primary method of identification for all subsequent requests.
When making requests, include the API key in the authorization header. If the key is invalid or missing, the API will return a 401 error. It is important to keep your key secure and avoid committing it to public repositories. Treat your API key like a password, as it grants access to your prepaid credit.
Errors such as 402 indicate that you have no credit left, while 429 signals that you have hit the rate limit. The rate limit is set at 300 requests per minute per key. If you exceed this limit, your requests will be throttled, so monitor your usage closely, especially during bulk operations or testing phases.
Since there is no subscription model, your access is tied directly to your prepaid credit. If you run out of credit, you will need to top up before you can make further requests. The system does not charge for errors or refusals, so you only pay for successful token usage. This means you can test extensively without worrying about unexpected charges for failed attempts.
Configuring SDK Parameters
Once authentication is set up, you need to configure the parameters for your chat completions. The API supports standard parameters such as temperature, top_p, stop sequences, seed, and various penalties. These parameters allow you to fine-tune the behavior of the model to suit your specific use case.
For example, setting a specific seed ensures reproducibility in your outputs, which is useful for debugging and testing. The temperature parameter controls the randomness of the output, while top_p limits the diversity of the tokens considered. Understanding how these parameters interact is key to getting the desired results from the model.
The API also supports streaming over Server-Sent Events (SSE). This allows you to receive responses in real-time, which can improve the user experience for applications that display text incrementally. The usage information is included in the last chunk of the stream, so you can track token consumption as you receive the response.
Function calling and JSON mode are also supported. If you need the model to output structured data, you can enable JSON mode to ensure the response is valid JSON. This is particularly useful for integrating the API with other systems that expect specific data formats. Always validate the output to ensure it meets your application's requirements.
Crypto Top-Up and Payment Verification
Payment for this service is exclusively crypto-based. You can top up your account with USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. You can choose any whole amount within this range to fund your account.
One of the benefits of topping up is the bonus credit. If you top up $50 or more, you receive a bonus ranging from 5% to 15%. This bonus is added to your account immediately after the transaction is confirmed. It is a great way to get more value for your money, especially if you plan to use the API extensively.
Unlike many other services, this API does not accept credit cards, PayPal, or bank transfers. You must use crypto for all transactions. This means you need a crypto wallet and a way to send transactions to the designated address. Make sure to send the correct amount and use the correct network to avoid losing your funds.
After topping up, verify your balance in the dashboard. The credit is charged based on real token usage, so you can monitor your consumption in real-time. Errors and refusals are free, so you only pay for the tokens that are actually generated. This transparent pricing model helps you control your costs effectively.
Testing Your First API Call
With your SDK configured and your account funded, it is time to make your first API call. Start with a simple prompt to verify that the connection is working correctly. Use the uncensored model ID and ensure your API key is correctly set in the header.
Check the response for any errors. If you receive a 401 error, double-check your API key. If you get a 402 error, verify that you have sufficient credit. A 429 error means you have hit the rate limit, so wait a minute before trying again. These errors are common for beginners, so keep them in mind.
Once you receive a successful response, you can start experimenting with different parameters. Try adjusting the temperature to see how it affects the output. Use the seed parameter to get consistent results. Test the streaming feature to see how it performs in your application.
Remember that the context window is 100,000 tokens, which includes both the prompt and the completion. This is a large context window, so you can send long prompts without worrying about truncation. However, keep in mind that longer prompts will consume more tokens, so monitor your usage accordingly.
When This API Is Not the Right Choice
While this API is powerful for text generation, it may not be the right choice for every project. If you need image generation, audio processing, or video creation, this text-only API will not meet your needs. You will need to find a provider that offers those specific capabilities.
Similarly, if you require embeddings for semantic search or fine-tuning for custom model training, this API does not support those features. The service is focused solely on text completion and chat. If your project relies on these advanced features, you should look for a more comprehensive solution.
Additionally, if you prefer to pay with credit cards or PayPal, this crypto-only model might not be convenient for you. You will need to set up a crypto wallet and manage your transactions manually. This can be a barrier for some users who are not familiar with cryptocurrency.
Finally, if you need an SLA guarantee or certifications like SOC2 or HIPAA, this service does not currently offer those. It is an independent service without formal certifications. If your project requires strict compliance or uptime guarantees, you should verify these details with your provider before committing.
Addressing Common Community Questions
Developers often discuss integration challenges in community threads, particularly regarding model behavior and casting choices in related media. For instance, discussions on r/StarWars often highlight how specific casting decisions can influence user perception of a character's capabilities, much like how model parameters influence output quality. Users frequently ask how to replicate specific tones or styles in their generated text.
Another common topic is the comparison between different model versions or forks. While some users debate the nuances of "uncensored" versus "censored" models, the key takeaway is to test the model with your specific prompts. The community often shares tips on how to tweak parameters to achieve the desired level of creativity or strictness in the output.
Questions also arise about the reliability of the API during peak usage. Users share experiences about rate limits and how to manage them effectively. It is recommended to implement exponential backoff in your SDK to handle 429 errors gracefully. This ensures that your application does not overwhelm the server during high traffic periods.
Finally, users often ask about the best practices for managing API keys and secrets. It is advised to use environment variables and rotate keys periodically. The community emphasizes the importance of security, especially when dealing with prepaid credit. By following these best practices, you can ensure a smooth and secure integration experience.
Frequently asked questions
How do I top up my account?
You can top up your account using USDT on the TRC20 network or USDC on the Base network. The minimum amount is $20, and the maximum is $500. Bonus credit is available for top-ups of $50 or more.
What happens if I run out of credit?
If you run out of credit, you will receive a 402 error. You can continue to make requests, but they will not be processed until you top up your account. Errors and refusals are free, so you only pay for successful token usage.
Can I use this API for image generation?
No, this API is text-only. It does not support image, audio, or video generation. If you need multimodal capabilities, you will need to use a different service for those tasks.
How do I handle rate limits?
The rate limit is 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. It is recommended to implement exponential backoff in your SDK to handle these errors gracefully.