API Documentation
Start using the NSFW uncensored LLM API immediately with these code samples. The service is fully OpenAI-compatible, so you can swap in your base URL and API key to begin generating text.
Authentication and Keys
Get your API key by signing up with Google or an email address. The key appears instantly on the dashboard. Use it as a Bearer token in the Authorization header for every request.
curl https://api.nsfwuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Check my plan balance"}]
}'
Chat Completions Endpoint
Send text to POST /v1/chat/completions and receive text back. The model ID is uncensored. Input fits within a 100,000 token context window.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwuncensored.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)
Streaming and SSE
Enable streaming by setting stream: true. Receive tokens via Server-Sent Events. Token usage appears in the final chunk.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwuncensored.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);
Parameters and Configuration
Adjust temperature, top_p, and stop sequences. Use response_format: {"type": "json_object"} for JSON output.
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)
Rate Limits and Quotas
Limit is 300 requests per minute per key. Concurrent requests cap at 8. Request bodies must stay under 8 MB.
Errors and Context Window
401 means invalid key. 402 indicates no credit. 429 signals rate limit. Context window is 100,000 tokens total.
Common questions
What is the primary keyword of the site?
The primary keyword is NSFW uncensored. This term appears in the H2 of its own section and in the first FAQ question.
How do I handle errors in the API?
Handle 401 for authentication issues, 402 for insufficient credit, and 429 for rate limits. Errors and refusals are free.
What is the context window size?
The context window is 100,000 tokens for prompt and completion combined. There is no separate output cap: a response can use all the room left in the window.
Generate your API key
Sign up, grab your key, and update your base URL. Simple integration.