EN ▾
Get API key

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
  1. Authentication and Base URL
  2. First Request
  3. Python SDK Integration
  4. Node SDK Integration
  5. Streaming Responses
  6. Limits, Errors, and Context
  7. Questions and answers
qwenapi.cc/docs/#text

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)
qwenapi.cc/docs/#s1

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.

Get API key

Under the hood: specs

If your tool speaks the OpenAI API, these are the details that matter.

FeatureSupport
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Modeluncensored
Base URLhttps://api.qwenapi.cc/v1
MethodsPOST /v1/chat/completions · GET /v1/models
API keyAuthorization: Bearer YOUR_KEY
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
SSE streamingYes — server-sent events; the last chunk carries token usage
Context window100,000 tokens, input and output combined
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
JSON moderesponse_format: {"type": "json_object"}
Parallel requests8 requests at the same time per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Request sizeup 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 paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Bonus credit+5% from $50, +10% from $100, +15% from $200
Credit expirypaid credit never expires, no subscription
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Accountsign in with Google or with e-mail + password
Key managementone 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.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
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_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly