Qwen api keys Documentation and Quickstart
Start generating text immediately with our uncensored API. This guide covers authentication, endpoints, and streaming for developers.
https://api.qwenapikeys.com/v1
Authentication: Using your qwen API keys
Use your key as a bearer token in the Authorization header. The key appears instantly after signup via Google or email.
- Header:
Authorization: Bearer YOUR_API_KEY - One active key per account; a new key replaces the old one.
Base URL and Endpoint structure
Direct your requests to our single chat-completions endpoint. No embeddings or image generation endpoints exist here.
- Base URL:
https://api.qwenapikeys.com/v1 - Endpoint:
POST /v1/chat/completions - Models:
GET /v1/modelsreturns "uncensored".
Sending requests: chat completions
Send a POST request with your system and user messages. The model answers without content refusals for lawful adult use.
Streaming responses and token usage
Enable streaming to receive tokens in real-time. Token usage appears in the final chunk of the stream.
Parameters: Temperature, Top P, and Seed
Control randomness with standard parameters. Set temperature, top_p, and seed to adjust output variability.
JSON Mode and Function Calling
Enforce structured output or enable tools. Use response_format: {"type": "json_object"} for strict JSON.
cURL
curl https://api.qwenapikeys.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list all python libraries for data analysis"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.qwenapikeys.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.qwenapikeys.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)Common questions
How do I authenticate with the qwen API documentation?
Include your key in the Authorization header as a bearer token. The key is generated instantly upon signup.
What is the context window for this uncensored qwen API?
The context window is 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens per request.
What happens if I hit the rate limit?
You receive a 429 error. Limits are 300 requests per minute and 8 concurrent requests per key.
Your key is almost ready
Register, copy the token, point your SDK to the new base URL. That is all there is to it.