Uncensored LLM API Quickstart
Get started with the uncensored LLM API in minutes. Send text, get text, no filters, no surprises.
Base URL and Authentication
The API lives at https://api.nsfwh.com/v1. Authenticate with an API key passed in the Authorization header. Create your key instantly via Google or email on the signup page—no phone number required. The key is shown once, so save it securely. It grants access to the uncensored model for lawful adult content, text generation, and creative writing without standard refusals.
curl https://api.nsfwh.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a summary of the provided text."}]
}'
Sending Your First Request
Make a POST request to /v1/chat/completions with your message. The model ID is uncensored. Input text goes into the messages array. The response contains generated text. No embeddings, images, or audio are supported. This is a pure text-in, text-out service designed for developers who need direct access to unfiltered language capabilities.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwh.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 Responses
Use Server-Sent Events for real-time token delivery. Add stream: true to your request. Each chunk includes partial text and usage data in the final chunk. This reduces perceived latency for long outputs. Streaming works with any standard OpenAI-compatible client that handles SSE. It is ideal for chat interfaces and interactive applications.
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)
Function Calling and JSON Mode
Enable structured outputs with response_format: {"type": "json_object"}. This forces the model to return valid JSON instead of freeform text. You can also define tools for function calling. Specify tool_choice to control how the model uses them. This is useful for parsing data, generating configs, or integrating with external systems without extra parsing logic.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwh.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);
Context Window and Limits
The model supports a 100,000 token context window for combined input and output. Maximum output per request is 16,000 tokens. If you omit max_tokens, it defaults to 2,048. You can send 300 requests per minute per key. Concurrency is limited to 8 simultaneous requests per key. Request bodies must stay under 8 MB. These limits ensure stable performance for high-volume usage.
Error Handling and Token Usage
Errors are returned as standard HTTP status codes. A 401 means your API key is invalid or expired. A 402 indicates insufficient credit. A 429 signals rate limiting. Check the response body for detailed error messages. Token usage is charged only for successful completions. Errors do not consume credit. This transparent pricing model means you pay for what works.
FAQ
Does the uncensored API work with OpenAI SDKs?
Yes, it is fully OpenAI-compatible. Use the official OpenAI SDKs by setting the base URL to our endpoint. Any OpenAI-compatible client works with minor configuration adjustments. This ensures easy integration into existing projects.
What happens if I exceed the rate limit?
You will receive a 429 status code. The limit is 300 requests per minute per key. You can spread requests across multiple keys if needed. Each key allows up to 8 concurrent requests. This prevents sudden spikes from disrupting service.
Is my data used for training?
No, prompts are not used for training. Your data stays private. We only collect an email for account creation. No phone number or additional personal data is required. This ensures your conversations remain confidential and secure.
Uncensored API. No refusals. Pay per token.
- per 1M input tokens
- $0.15
- Output tokens / 1M
- $0.50
- token context
- 100,000
- trial credit
- $0.50
- requests per minute
- 300
Get your API key now
Sign up, copy the token, update the base URL. Done.