EN ▾

How to Run Uncensored Qwen via API

Uncensored Qwen models offer high performance for coding and multilingual tasks without the default safety refusals of hosted providers. By using a standard OpenAI-compatible endpoint, you can run the uncensored variant via script with minimal setup and no phone verification.

How to Run Uncensored Qwen via API

Updated

Key points

  • The API uses the standard OpenAI chat-completions endpoint, meaning you only need to change your base_url and API key.
  • Qwen models excel at code generation and multilingual tasks while remaining open to controversial or adult topics.
  • Our hosting handles the heavy lifting with a 100k context window, avoiding the hardware constraints of local Ollama.
  • You pay only for tokens used, with top-ups by crypto (USDT on TRC20, USDC on Base) and a privacy-first approach that does not train on your prompts.

What is Uncensored Qwen?

Qwen is a family of large language models developed by Alibaba Cloud. The base models are powerful, particularly in code generation and multilingual understanding. "Uncensored" refers to a version that has been fine-tuned or prompted to remove the standard safety refusals. These refusals often block the model from discussing adult content, political controversies, or generating slightly edgy creative writing.

When you use an uncensored Qwen API, you get the raw capability of the model. It will answer your question directly, even if the topic is mature or unusual. This is useful for creative writing, roleplay, or research where you want the model's full range of knowledge without it filtering its own answers.

It is important to note that the model is not GPT, Claude, or Gemini. It is an open-weight model that runs on our infrastructure. We do not claim it is superior in all benchmarks, but it is a valid alternative for developers who need fewer restrictions.

Why Use the API Instead of Local Ollama?

Running Qwen locally with Ollama is free but requires hardware. You need a GPU with enough VRAM to load the model. For larger models, this means expensive graphics cards or limited context windows. The API offloads this to our servers. You get access to the full model regardless of your local machine.

Our hosted endpoint supports a 100,000 token context window. This allows you to pass large documents or codebases in a single request. Local setups often struggle with memory management when the context grows. With our API, the heavy lifting is handled for you.

Additionally, the API is always available. You do not need to keep a local process running or manage updates. You simply send requests via the standard protocol. This is ideal for production applications or development environments where consistency matters.

Setting Up Your Environment

Using the API requires an API key. You can get one by signing up with Google or an email address. No phone number is required. The key is shown immediately after signup. You only need one active key per account; generating a new one replaces the old one.

To connect, you use the official OpenAI SDKs for Python, Node.js, or any other language. You only need to change two things: the base URL and the API key. The base URL is https://api.ollamauncensored.top/v1. The model ID is "uncensored".

  • Install your preferred SDK.
  • Set the API key in your environment.
  • Update the base URL in your client configuration.

This works because we follow the OpenAI chat-completions standard. Your existing code structure remains the same.

Configuring Parameters for Best Results

The API supports standard parameters. You can adjust temperature, top_p, and seed to control randomness. Higher temperature values make the output more creative. Lower values make it more deterministic.

You can also use tool calling. This allows the model to call functions or generate structured data. JSON mode is available for strict output formats. Use the response_format parameter to enforce JSON.

Streaming is supported via Server-Sent Events. This lets you process tokens as they are generated. Token usage details are included in the final chunk. This is useful for real-time applications where latency matters.

Handling Long Context Windows

The API supports up to 100,000 tokens per request. This includes both the prompt and the completion. You can pass large code files, long articles, or extensive conversation histories. This is a significant advantage over local setups where VRAM limits context size.

However, there are limits. The prompt and the output share the 100,000-token window. If you do not set max_tokens, the response can run to the end of the window. Be mindful of token counts to avoid exceeding limits.

Long contexts can be expensive. You pay per token. Plan your prompts efficiently. Remove unnecessary history or truncate old messages if they are not needed for the current task.

Troubleshooting Common Errors

If you get a 401 error, your API key is invalid or expired. Check your account settings. If you get a 429 error, you have exceeded the rate limit. The limit is 300 requests per minute per key. You can have 8 requests active at the same time.

If the response is empty, check your request body. Ensure the model ID is "uncensored". Also, verify that your message content is properly formatted. The API does not support images or audio, so do not include them in the request.

Errors and refusals are free. You only pay for successful token generation. This means you can test your prompts without worrying about cost for failed requests.

Comparison with Other Uncensored Models

Other uncensored options include models like Llama, Mistral, and Grok. Each has strengths. Llama is widely supported. Mistral is efficient. Grok has real-time data access. Qwen excels in code and multilingual tasks.

Our API provides a consistent experience. You do not need to switch SDKs for different models. The standard OpenAI format works for all. This reduces complexity in your codebase.

Price varies by provider. Our pricing is transparent: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. There are no monthly fees.

Privacy Benefits of Our Hosting

We prioritize privacy. Your account only requires an email address. No phone number is needed. This reduces personal data exposure. Your prompts are not used for training. This is important for commercial use or sensitive data.

Payments are by crypto (USDT on TRC20, USDC on Base). Crypto payments allow anonymous transactions if you use a non-KYC wallet. The trial credit of $0.50 is available for new accounts without a card. Claim this credit with one click on your API key page.

We do not sell your data. Your usage is not shared with third parties. This is a key difference from free tiers that monetize your inputs.

Questions and answers

Is this the official Qwen API?

No, we are an independent host. We run an uncensored version of the Qwen model on our servers. It is not affiliated with Alibaba Cloud. We use the standard OpenAI-compatible format.

How do I pay?

We accept top-ups by crypto (USDT on TRC20, USDC on Base). Top-ups range from $20 to $500. Credit never expires.

What is the context window?

The context window is 100,000 tokens. This includes both input and output. There is no separate output cap. If max_tokens is not specified, the response can run to the end of the window.

Is there a free trial?

Yes. New accounts get $0.50 of trial credit valid for 7 days. Claim this credit with one click on your API key page. No credit card is needed. You can sign up with Google or email.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key