First request in five minutes
Connect your existing OpenAI-compatible clients to the uncensored LLM API by updating the base URL and API key. This quickstart covers authentication, chat completions, streaming, and the specific constraints of the service.
Base URL & Authentication
To use the uncensored api, update your client configuration to point to our base URL:https://api.qwencoder.top/v1. Authentication uses standard OpenAI headers with your unique API key. You can obtain a key instantly via Google sign-in or email registration on the Get API key page. The key is displayed immediately and remains active until revoked. There are no monthly subscriptions or credit card requirements. If you are migrating from another provider, simply replace the base URL and inject your new key. The endpoint structure matches the standard POST /v1/chat/completions format, ensuring your existing code works without modification. For a full list of available models and endpoints, use GET /v1/models. This openai compatible api setup allows you to switch contexts instantly between different LLM providers while keeping your application logic intact.
Chat Completions Endpoint
Send text inputs and receive text outputs using the standard chat completions endpoint. The model identifier isuncensored. This open-weight model is tuned for fewer content refusals on lawful adult, fictional, or controversial topics. It does not block standard controversial themes, though it does enforce a hard limit on sexual content involving minors. You can test the endpoint directly with a simple curl request. The service processes text in and text out, supporting up to 100,000 tokens for the combined prompt and completion. If you do not specify a token limit, the response can run to the end of the 100,000-token window. Billing is transparent: you pay only for the tokens used in valid requests, and errors or refusals are free. This uncensored chat completions API is designed for developers who want predictable costs without monthly commitments.
Streaming Responses
Enable real-time token delivery by setting thestream parameter to true. The API returns Server-Sent Events (SSE), allowing your application to display tokens as they are generated. This is particularly useful for long-form generation or interactive applications. Token usage statistics are included in the final chunk of the stream, so you can track costs in real-time. The uncensored llm supports streaming just like any standard OpenAI-compatible client. Ensure your client handles SSE correctly to avoid buffering delays. Streaming does not affect the pricing model; you still pay per token for input and output. This feature is ideal for power users who want immediate feedback on model performance without waiting for the full response to complete.
Function Calling & Tools
The API supports function calling with thetools and tool_choice parameters. Define your tools in the request body, and the model will return structured arguments when appropriate. This allows your application to execute code or fetch data based on the model's output. The uncensored api handles tool definitions similarly to the standard OpenAI format. You can specify whether the model should choose a tool automatically or force a specific one. This capability is essential for building agentic workflows or complex applications that require external data integration. The model is trained to recognize tool contexts accurately, ensuring reliable execution. Note that tool definitions are part of the token count, so include only the necessary fields to stay within your context window limits.
JSON Mode
Force the model to output valid JSON by settingresponse_format to {"type": "json_object"}. This ensures the response can be parsed directly by your application without additional cleanup. JSON mode is useful for structured data extraction or when feeding model output into another system. The uncensored api strictly adheres to this format when requested. If the model fails to produce valid JSON, it will retry or return an error depending on your client configuration. This feature is particularly valuable for developers who need consistent, machine-readable outputs. It works alongside other parameters like temperature and top_p to control creativity and determinism. Use JSON mode when precision is more important than narrative flow.
Parameters & Constraints
Control model behavior with standard parameters:temperature, top_p, stop, seed, presence_penalty, and frequency_penalty. The context window is 100,000 tokens total, with no separate output cap. If max_tokens is unset, the response can run to the end of the 100,000-token window. The API enforces a hard content limit: sexual content involving minors is always refused. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Prepaid credit is charged only for successful token usage. Errors are free, and credit never expires. You can top up with USDT (TRC20) or USDC (Base) via crypto. The trial credit is $0.50 for 7 days, no card needed. This transparent billing model ensures you know exactly what you are paying for.cURL
curl https://api.qwencoder.top/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.qwencoder.top/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.qwencoder.top/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)API facts in one table
Before you integrate, here is exactly what you get with a key.
| Feature | Support |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| API key | Authorization: Bearer YOUR_KEY |
| Model ID | uncensored |
| Base URL | https://api.qwencoder.top/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Context window | 100,000 tokens (prompt + completion together) |
| Streaming | Supported (stream: true), usage included at the end |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Structured output | JSON object mode via response_format json_object |
| Rate limit | 300 requests per minute per key |
| Parallel requests | 8 requests at the same time per key |
| Request size | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Subscription | paid credit never expires, no subscription |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Trial credit | $0.50 for 7 days, no card · 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 |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
| Keys | one active key per account; a new key replaces the old one |
| Account | Google or e-mail and password |
Error reference
The type field is stable, the message is for humans. Errors cost nothing.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | sexual content involving minors — refused, not billed |
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 | model busy — retry in a few seconds |
Questions and answers
What happens if I run out of credit during a request?
If your balance is insufficient, the API returns a 402 error. You will need to top up your prepaid credit by crypto (USDT on TRC20 or USDC on Base) before making further requests. Errors and refusals do not consume credit, so you can test freely even with a zero balance.
How do I handle rate limits?
The API allows 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, you will receive a 429 error. Implement exponential backoff in your client to handle rate limiting gracefully. Each account has one active key; generating a new key replaces the old one.
Is the API compatible with all OpenAI SDKs?
Yes, the API follows the standard OpenAI-compatible format. You can use the official OpenAI SDKs for Python, Node.js, and other languages by simply updating the base URL and API key. It works with any client that supports the /v1/chat/completions endpoint.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.