NSFW LLM: Quickstart: Integrate the Uncensored LLM API
Integrate the uncensored LLM API into your application with this quickstart guide. You will learn how to authenticate, send requests, and handle streaming responses using standard OpenAI-compatible SDKs.
Base URL and Authentication
Start by pointing your OpenAI-compatible client to our hosted endpoint. All requests require a valid API key passed in the Authorization header. You can generate a key immediately after signing up with Google or email on the Get API key page.
Base URL: https://api.nsfwllm.cc/v1
Authentication: Authorization: Bearer YOUR_API_KEY
The API serves the uncensored model, an open-weight model tuned for lawful adult content without refusals. It supports standard parameters like temperature, top_p, and stop. Note that this is a text-only API; we do not offer embeddings, image generation, or fine-tuning endpoints.
First Request
Send your first prompt using standard cURL. This example demonstrates a basic chat completion request to the uncensored model. The response will include the generated text and token usage statistics.
If you receive a 401 error, verify your API key. A 402 error indicates insufficient prepaid credit. A 429 error means you have exceeded the rate limit.
curl https://api.nsfwllm.cc/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."}]
}'The model accepts a context window of 100,000 tokens total (prompt plus completion). You can specify a maximum output length, but if max_tokens is omitted, the response can run to the end of the window.
Python Integration
Use the official OpenAI Python SDK to integrate the API with minimal code changes. Set the base_url and api_key attributes to route requests to our uncensored endpoint.
This approach works for any application using the standard OpenAI client structure. You can pass parameters like temperature and top_p to control randomness. The API supports JSON mode via response_format and tool use via the tools parameter.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwllm.cc/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)Pricing is transparent: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals do not consume credit.
Node.js Integration
For JavaScript or TypeScript projects, initialize the OpenAI client with our base URL. This allows you to use familiar methods like chat.completions.create within your Node.js environment.
Ensure you handle the asynchronous response correctly. The API supports streaming responses, which is ideal for chat interfaces or real-time content generation. You can also enable strict JSON output mode for structured data generation.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwllm.cc/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);Remember that prepaid credit never expires. You can top up using USDT (TRC20) or USDC (Base) via crypto payments.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) containing incremental text chunks. Token usage information is provided in the final chunk of the stream.
This method reduces perceived latency for end-users by displaying content as it is generated. It is particularly useful for roleplay applications or long-form content generation where the full response might run close to the end of the window.
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)Streaming does not affect pricing; you are charged for the total tokens generated across all chunks.
Rate Limits and Errors
Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, the API returns a 429 Too Many Requests error.
Common errors include 401 (invalid key), 402 (insufficient credit), and 400 (invalid request format). You can generate a new key to replace an existing one if needed, but only one active key is allowed per account.
The uncensored model blocks sexual content involving minors but allows other lawful adult content. Credit is not refunded for errors, but mistakes like double charges can be resolved via the Support page.
Under the hood: specs
One table with every limit, feature and price that applies to your key.
| Parameter | Details |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Model | uncensored |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Authentication | Bearer token in the Authorization header |
| Base URL | https://api.nsfwllm.cc/v1 |
| JSON mode | response_format: {"type": "json_object"} |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Context window | 100,000 tokens (prompt + completion together) |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Max body | up to 8 MB per request |
| Rate limit | 300/min per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Concurrency | up to 8 in parallel per key |
| Credit expiry | paid credit never expires, no subscription |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| 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 |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Sign-in | sign in with Google or with e-mail + password |
| Key management | one active key per account; a new key replaces the old one |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
Error reference
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
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 | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
What is the context window size?
The model supports a 100,000 token context window, including both the prompt and the completion. If max_tokens is not specified, the response can run to the end of the window.
How do I pay for the API?
We accept crypto only: USDT (TRC20) or USDC (Base). You can top up any whole amount from $20 to $500. Credit never expires, and you receive bonus credit for larger top-ups.
Is there a free trial?
New users get $0.50 of trial credit, one per person, valid for 7 days. Claim this credit with one click on your API key page. No credit card is needed to sign up via Google or email.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.