EN ▾

Uncensored API. No refusals. Direct.

Switch your client in three lines

Get your first uncensored LLM response in under five minutes. This quickstart covers authentication, core endpoints, and streaming for the qwen nsfw API.

Start with trial credit

Email and password, key on screen right away.

Get API key

Base URL and Authentication

Our API follows the standard OpenAI chat-completions format. This allows you to use existing client libraries with minimal configuration changes. The base URL for all requests is https://api.qwennsfw.top/v1.

Authentication relies on a single API key generated during signup. Pass this key in the Authorization header as a Bearer token. The key grants access to the uncensored model identified by the string uncensored. We do not route between multiple vendors or models; this endpoint serves one specific open-weight model tuned for unrestricted text generation.

First Request

Verify connectivity and model access with a simple prompt. This curl command sends a basic request to the chat completions endpoint. Replace YOUR_API_KEY with the key displayed after your Google or email signup.

This request confirms that the base URL is reachable and that your credit balance is sufficient for token usage. Errors return standard HTTP status codes. A 401 indicates an invalid key, while a 402 signals insufficient funds.

The response body contains the generated text, token usage statistics, and metadata. You can immediately use this response in your application logic or debug the raw JSON output.

curl https://api.qwennsfw.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 SDK Integration

Use the official OpenAI Python library to interact with our API. Install the package via pip and configure the client with our base URL and your API key. The client handles serialization and authentication automatically.

Call the chat.completions.create method with the model name uncensored. Pass your message history in the messages parameter. The library returns a response object containing the generated content and usage data.

This approach minimizes boilerplate code. You can easily switch between our API and other OpenAI-compatible services by changing only the base URL and API key. The response format remains consistent across compatible clients.

from openai import OpenAI

client = OpenAI(base_url="https://api.qwennsfw.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 SDK Integration

The Node.js client follows the same pattern. Initialize the OpenAI client with your base URL and key. Use the chat.completions.create method to send requests.

Define your system and user messages in the messages array. The API returns the completion asynchronously. Handle the response to extract the generated text or error details.

This setup works well for server-side applications or backend services. You can stream responses for better user experience, as described in the next section. The Node SDK manages connection pooling and retry logic efficiently.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.qwennsfw.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 Responses

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text, allowing you to display output in real-time.

The final chunk in the stream includes the complete token usage statistics. This allows you to track credit consumption accurately. Streaming reduces perceived latency for long responses.

Handle stream events to update your UI or process text incrementally. Ensure your client library supports SSE parsing. The uncensored model behaves consistently whether streaming or returning a complete response.

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

Each API key allows 300 requests per minute and 8 concurrent connections. The request body must not exceed 8 MB. The context window supports 100,000 tokens total, with no separate output cap.

Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit exceeded). Errors do not consume credit. Prepaid credit never expires, and unused funds remain available for future requests.

The model refuses sexual content involving minors. Other uncensored topics are allowed. Adjust parameters like temperature and top_p to control creativity. Use JSON mode for structured outputs.

Technical specifications

Everything the endpoint can and cannot do, in one place — check it before you top up.

SpecValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.qwennsfw.top/v1
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
AuthenticationAuthorization: Bearer YOUR_KEY
SSE streamingYes — server-sent events; the last chunk carries token usage
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
JSON modeJSON object mode via response_format json_object
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Max context100,000 tokens (prompt + completion together)
Requests per minute300 requests per minute per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Concurrency8 requests at the same time per key
Request sizeup to 8 MB per request
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Credit expirypaid credit never expires, no subscription
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Bonus credit+5% from $50, +10% from $100, +15% from $200
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Keysone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused
Sign-inGoogle or e-mail and password

Error reference

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
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_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Does the API support image or audio generation?

No. This is a text-only API. It serves chat-completions for the uncensored model. It does not support embeddings, image generation, audio, or video.

How is credit charged?

Credit is charged based on real token usage. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals are free.

What happens if I run out of credit?

Requests return a 402 error. You can top up using USDT (TRC20) or USDC (Base). Credit never expires, and you can add any whole amount from $20 to $500.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key