NSFW LLM API Quickstart Guide
Integrate our uncensored LLM API into your NSFW chatbot or creative writing tool with this quickstart guide. Use standard OpenAI-compatible endpoints to generate adult content without unexpected refusals.
https://api.nsfwimageapi.com/v1uncensoredAuthentication & Base URL
Our API uses standard OpenAI-compatible authentication. You need a base URL and an API key. Sign up at the Get API key page with just an email and password to receive your key instantly. No credit card is required for the trial.
The base URL for all requests is https://api.nsfwimageapi.com/v1. Set your Authorization header to Bearer YOUR_API_KEY. This works with any OpenAI SDK or compatible client. Your prompts are not used for training, and you can regenerate your key at any time.
First Request
Send a POST request to /v1/chat/completions with the model ID uncensored. This model is tuned for adult roleplay and does not refuse lawful adult content. It is an open-weight model running on our servers, not GPT or Claude.
Example request:
curl https://api.nsfwimageapi.com/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."}]
}'This returns a text completion. The model supports a 64,000 token context window for both prompt and completion. It is designed for direct text generation without the filters found in standard models.
Python SDK Integration
Use the official OpenAI Python library to interact with the API. Configure the client with our base URL and your API key. This allows you to use familiar methods like chat.completions.create.
Example code:
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwimageapi.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)This setup ensures compatibility with existing tools built for OpenAI. The uncensored model handles NSFW prompts without blocking. Remember that the model is not GPT, Claude, or any other vendor's model.
Node SDK Integration
For Node.js applications, use the openai npm package. Initialize the client with the custom base URL and your API key. This enables seamless integration into web servers or bots.
Example code:
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwimageapi.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);The Node SDK supports all standard chat completion features. You can stream responses or use function calling. The model is optimized for creative writing and roleplay, making it ideal for NSFW chatbot API deployments.
Streaming Responses (SSE)
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) with incremental token updates. This reduces perceived latency for users in chat interfaces.
Example streaming code:
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)Parse the SSE events to display tokens in real-time. Streaming works with all standard clients. The context window remains 64,000 tokens even when streaming. This is crucial for maintaining coherence in long NSFW stories or roleplays.
Limits, Errors & Context
Rate limit: 300 requests per minute per key. Request body limit: 8 MB. If you send an invalid key, you get a 401 error. If you have no credit, you get a 402 error. If you exceed the rate limit, you get a 429 error.
The context window is 64,000 tokens total (prompt + completion). Pay-as-you-go pricing applies: $0.25 per 1M input tokens and $1.00 per 1M output tokens. Credit never expires. Minor sexual content is always blocked.
Technical reference
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Spec | Value |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.nsfwimageapi.com/v1 |
| Model | uncensored |
| Authentication | Authorization: Bearer YOUR_KEY |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Max output | 16,000 tokens max; 2,048 if max_tokens is not set |
| Max context | 64,000 tokens, input and output combined |
| Function calling | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| JSON mode | response_format: {"type": "json_object"} |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Concurrency | up to 8 in parallel per key |
| Rate limit | 300 requests per minute per key |
| Request size | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Credit expiry | no monthly fee; paid credit does not expire |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Free trial | $0.50 for 7 days, no card |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $10 to $500 |
| Volume bonus | +5% from $50, +10% from $100 |
| Price | input $0.25 / 1M tokens, output $1.00 / 1M tokens |
| Key management | one active key per account; a new key replaces the old one |
| Sign-in | sign in with Google or with e-mail + password |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
Error reference
The type field is stable, the message is for humans. Errors cost nothing.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or prompt + max_tokens over the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 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
Is this the same as OpenAI's GPT model?
No. This is an open-weight model tuned for adult content. It is not GPT, Claude, Gemini, or any other vendor's model. It runs on our own GPU servers.
What happens if I run out of credit?
You receive a 402 error indicating insufficient funds. You can top up from $10 using crypto (USDT or USDC). Credit never expires, so you can top up whenever needed.
Does the API block NSFW content?
No. The model is uncensored and does not refuse lawful adult, fictional, or controversial topics. The only hard limit is sexual content involving minors, which is always blocked.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.