uncensoredqwen.com/Docs
Quickstart for Qwen users
Integrate the uncensored Qwen model into your application using our OpenAI-compatible API. This guide covers setup, basic requests, streaming, and error handling for rapid development.
https://api.uncensoredqwen.com/v1uncensored
Prerequisites and Authentication
To begin, you need an API key. Visit the Get API key page to create an account with just an email and password. No credit card is required to start, and new accounts receive $0.50 in trial credits valid for 7 days. Claim this credit with one click on your API key page. Your key is displayed immediately after signup.
All requests must include the Authorization: Bearer <your-api-key> header. If you see a 401 error, verify your key is correct. If you regenerate your key, the old one is revoked immediately, but your rate limit counter does not reset.
Basic Chat Completion
Send a simple text prompt to generate a response. Our API accepts standard OpenAI payload formats. The model ID is uncensored, and it supports a context window of 100,000 tokens for combined input and output.
- Base URL:
https://api.uncensoredqwen.com/v1 - Endpoint:
POST /v1/chat/completions
Here is a basic request using cURL:
curl https://api.uncensoredqwen.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'
Python SDK Integration
Use the official OpenAI Python client to interact with our API. Point the client to our base URL and provide your key. This allows you to use familiar methods like chat.completions.create.
- Install the client:
pip install openai - Set
base_urltohttps://api.uncensoredqwen.com/v1
Example implementation:
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredqwen.com/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)
Node.js SDK Usage
For JavaScript environments, use the openai npm package. Configure the client with our base URL and your API key to send requests. This approach works for both server-side and browser-based applications.
- Install:
npm install openai - Configure
baseUrlandapiKey
Sample code for Node.js:
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredqwen.com/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);
Streaming Responses
Receive tokens in real-time by enabling streaming. Set stream: true in your request to get a Server-Sent Events (SSE) stream. This reduces perceived latency for users waiting for long responses.
- Handle the stream in chunks
- Concatenate tokens to form the final response
Streaming example:
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Limits, Errors, and Context
Monitor your usage to avoid interruptions. The API enforces a limit of 300 requests per minute per key. If you exceed this, you will receive a 429 error. Request bodies must be under 8 MB.
Common errors include:
- 401 Unauthorized: Invalid or revoked API key.
- 402 Payment Required: Insufficient credit balance. Top up from $20.
- 429 Too Many Requests: Rate limit exceeded.
Regenerating your key revokes the old one but does not reset your rate limit counter.
Technical reference
Use this table to decide whether the API fits your project before you buy credit.
| Spec | Value |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Model ID | uncensored |
| Base URL | https://api.uncensoredqwen.com/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Authentication | Authorization: Bearer YOUR_KEY |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Function calling | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Structured output | response_format: {"type": "json_object"} |
| Max context | 100,000 tokens, input and output combined |
| Max body | up to 8 MB per request |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300/min per key |
| Concurrency | up to 8 in parallel per key |
| Subscription | no monthly fee; paid credit does not expire |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Free trial | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Sign-in | sign in with Google or with e-mail + password |
| Keys | one active key per account; a new key replaces the old one |
| Content | adult content allowed; sexual content involving minors is refused |
HTTP errors
The type field is stable, the message is for humans. Errors cost nothing.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
What is the context window size?
The model supports a context window of 100,000 tokens, counting both the prompt and the completion. This allows for substantial input and output within a single request.
Does regenerating my API key reset my rate limit?
No. Regenerating your key revokes the old one immediately, but your rate limit counter continues from where it was. You do not start fresh.
Are there any content restrictions?
The model is uncensored for lawful adult, fictional, and controversial topics. However, requests containing sexual content involving minors are always blocked.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key