EN ▾
Get API key

uncensoredqwen.comDocs

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.

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.

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.

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.

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:

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.

SpecValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Model IDuncensored
Base URLhttps://api.uncensoredqwen.com/v1
MethodsPOST /v1/chat/completions · GET /v1/models
AuthenticationAuthorization: Bearer YOUR_KEY
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
SSE streamingYes — server-sent events; the last chunk carries token usage
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Structured outputresponse_format: {"type": "json_object"}
Max context100,000 tokens, input and output combined
Max bodyup to 8 MB per request
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300/min per key
Concurrencyup to 8 in parallel per key
Subscriptionno monthly fee; paid credit does not expire
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Billingprepaid 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-insign in with Google or with e-mail + password
Keysone active key per account; a new key replaces the old one
Contentadult content allowed; sexual content involving minors is refused

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary 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