Quickstart for Qwen users
Connect your existing OpenAI-compatible client to our uncensored endpoint. Change the base URL, inject your key, and start sending requests.
uncensoredhttps://api.qwenapi.cc/v1
On this page
Authentication and Base URL
Our API uses standard Bearer token authentication. You receive your key immediately after signing up via Google or email. Keep this key secure; it provides access to your prepaid credit. The base URL for all requests is https://api.qwenapi.cc/v1. Update your client configuration to point to this endpoint instead of the default OpenAI URL.
Authentication is handled by passing the Authorization header with every request. No API key means the model cannot verify your account balance, resulting in a 401 error. There are no hidden headers or custom auth schemes required.
First Request
Send a standard chat completion request to test connectivity. Replace YOUR_API_KEY with your actual key. The endpoint accepts standard JSON payloads with model, messages, and content fields.
- Model identifier:
uncensored - Endpoint:
POST /v1/chat/completions - Format: JSON
This request will consume input tokens from your balance. Ensure your client handles the JSON response correctly to verify the connection is working.
Python SDK Integration
Use the official OpenAI Python library. It requires minimal configuration to route traffic to our endpoint. Initialize the client with your key and the correct base URL. This approach leverages existing codebases without rewriting request logic.
Pass the model ID uncensored when creating the response. The library handles serialization and deserialization automatically. This method is recommended for most backend integrations and script-based workflows.
Node SDK Integration
For JavaScript or TypeScript environments, use the @anthropic-ai/sdk or standard OpenAI Node package. Configure the base URL to point to our API. This allows you to drop our service into existing Node applications without major refactoring.
Ensure you are using a recent version of the SDK that supports custom base URLs. Pass the model identifier uncensored to select our uncensored model. This setup works seamlessly with Express routes or serverless functions.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) as the model generates text. This provides lower latency for end-users and allows real-time display of output.
Token usage statistics are included in the final chunk of the stream. Process each delta incrementally to build the complete response. This feature is essential for chat interfaces and applications requiring immediate feedback.
Limits, Errors, and Context
Respect the rate limits to avoid service disruption. The API allows 300 requests per minute and 8 concurrent requests per key. The maximum request body size is 8 MB. If you exceed these limits, you will receive a 429 error.
Authentication errors return 401, indicating an invalid or missing key. Balance errors return 402, meaning your prepaid credit is exhausted. The context window supports 100,000 tokens total, with no separate output cap. Errors and refusals do not consume credits.
cURL
curl https://api.qwenapi.cc/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
from openai import OpenAI
client = OpenAI(base_url="https://api.qwenapi.cc/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
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.qwenapi.cc/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
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)Questions and answers
How do I handle rate limiting?
The API enforces a limit of 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, the API returns a 429 status code. Implement exponential backoff in your client to handle retries gracefully.
Does the API support function calling?
Yes, the API supports function calling via the standard tools format. You can specify tools and tool_choice in your request to enable structured output or external tool integration. This feature works with the standard OpenAI-compatible schema.
What happens if I exceed my context window?
The model supports a total context window of 100,000 tokens, including both prompt and completion. If you exceed this limit, the request will fail. Ensure your application tracks token usage to stay within these bounds.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Under the hood: specs
If your tool speaks the OpenAI API, these are the details that matter.
| Feature | Support |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Model | uncensored |
| Base URL | https://api.qwenapi.cc/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| API key | Authorization: Bearer YOUR_KEY |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Context window | 100,000 tokens, input and output combined |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| JSON mode | response_format: {"type": "json_object"} |
| Parallel requests | 8 requests at the same time per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Requests per minute | 300/min per key |
| Request size | up to 8 MB per request |
| Trial credit | $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 |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Credit expiry | paid credit never expires, no subscription |
| Payment | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Account | sign in with Google or with e-mail + password |
| Key management | one active key per account; a new key replaces the old one |
When a request fails
The type field is stable, the message is for humans. Errors cost nothing.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
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 | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |