- Qwenapidocumentation
- Qwen api documentation: quickstart
Qwen api documentation: quickstart
Get your uncensored LLM API key and start sending requests to our OpenAI-compatible endpoint in under a minute. This guide covers the base URL, authentication, and core parameters for the uncensored model.
Base URL and authentication
Use https://api.qwenapidocumentation.com/v1 as your base URL. Authenticate by passing your API key in the Authorization header.
Sign up via Google or email to receive your key immediately.
Chat completions endpoint (/v1/chat/completions)
Send POST requests to /v1/chat/completions with your model ID uncensored. The endpoint accepts standard chat messages and returns text.
- Input: JSON body with
messagesarray. - Output: Tokenized text response.
Our model is tuned to answer without content refusals for lawful adult use.
Python SDK integration
Install the official OpenAI Python package. Set the base URL and API key before initializing the client.
- Context Window: 100,000 tokens total.
- Max Output: 16,000 tokens per request.
This setup ensures your client code works exactly as it would for other major vendors.
Node.js SDK usage
Use the openai Node.js package. Configure the client with your unique API key and our base URL.
- Rate Limit: 300 requests per minute per key.
- Concurrent: 8 simultaneous requests.
This allows for high-throughput applications without complex retry logic.
Streaming responses with SSE
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE).
- Token Usage: Included in the last chunk.
- Real-time: Tokens arrive as they are generated.
This is ideal for chat interfaces where users expect instant feedback.
Error handling and limits
Handle standard HTTP errors. 401 indicates an invalid key. 402 means no credit. 429 is a rate limit.
- Request Body: Max 8 MB.
- Refusals: Free if content violates the hard limit.
Errors do not consume your prepaid credit. Context window is 100,000 tokens.
cURL
curl https://api.qwenapidocumentation.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Calculate the area of a circle with radius five"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.qwenapidocumentation.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
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.qwenapidocumentation.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
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)FAQ
Is this the official Qwen API documentation?
No. We are an independent provider. We host our own uncensored model, not Qwen. Check the official Qwen site for their specific documentation and pricing.
What is the context window size?
The context window is 100,000 tokens for both prompt and completion combined. You can output up to 16,000 tokens per request.
How do I pay for the API?
We accept crypto only: USDT (TRC20) or USDC (Base). Top-ups range from $20 to $500. Credit never expires.
Get your API key
Register, retrieve the key, update your base URL. Done.