Qwen nsfw API Documentation
Get your uncensored LLM API running in minutes with standard OpenAI-compatible clients. This guide covers the base URL, authentication, and quick integration steps for the NSFW LLM API.
Installation and setup
Start by installing your preferred SDK and setting two environment variables. You need the API key from your dashboard and the base URL for the service.
- Base URL:
https://api.nsfwqwen.com/v1 - Model ID:
uncensored
This configuration works with any standard OpenAI-compatible client. The model runs on our own servers and is not a proxy for other vendors. You will not need to change your application logic, just the connection details.
Authentication
Pass your API key in the Authorization header using the Bearer scheme. Every request must include this header to authenticate with the server.
- Header name:
Authorization - Header value:
Bearer YOUR_API_KEY
If the key is missing or invalid, the server returns a 401 error. Your key is generated immediately after signup via Google or email. Keep it secure, as it grants access to your prepaid credit.
Chat completions endpoint
Send your prompt to the /v1/chat/completions endpoint using a POST request. The model returns text based on your input without filtering lawful adult content.
curl https://api.nsfwqwen.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the current version number?"}]
}'The response contains the generated text in the choices array. You can set the context window up to 100,000 tokens for prompt and completion combined. This allows for long conversations or large document processing without immediate context loss.
Streaming responses
Enable streaming by setting stream: true in your request. The server sends tokens as they are generated via Server-Sent Events (SSE). This is ideal for real-time user interfaces.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwqwen.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)Each chunk includes the partial text. You can accumulate these chunks to display the full response to the user. The final chunk also contains the total token usage for billing purposes.
Parameters and settings
Control the model's behavior using standard parameters like temperature, top_p, and stop. Use response_format with json_object for structured outputs.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwqwen.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);You can also set seed for reproducible results. Function calling is supported via the tools parameter. Adjust these settings to fit your specific use case, whether it is creative writing or technical generation.
Error handling
Handle errors gracefully by checking the HTTP status code. A 401 error means your API key is invalid. A 402 error indicates insufficient credit in your account.
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)A 429 error signals that you have exceeded the rate limit of 300 requests per minute. Ensure your retry logic handles these cases. The model refuses requests with sexual content involving minors, regardless of other settings.
Common questions
Is this the official Qwen NSFW API?
No, this is an independent service. We run our own uncensored open-weight model. It is not a proxy for the official Qwen, GPT, or Claude APIs. We serve a different model optimized for uncensored responses.
How do I top up my credit?
You can top up using USDT (TRC20) or USDC (Base). The minimum amount is $20, and the maximum is $500. You receive bonus credit for larger top-ups, such as +15% for $200.
Does the model filter NSFW content?
The model is uncensored and does not refuse lawful adult content. However, it always refuses sexual content involving minors. This limit is hard-coded and cannot be disabled.
Your API key is one step away
Register, grab the key, point to the endpoint. That is the entire process.