NSFW LLM API Documentation
Start generating uncensored content immediately with our OpenAI-compatible NSFW LLM API. This quickstart guide covers authentication, endpoints, and streaming to help you integrate the max NSFW model into your application.
Authentication and Base URL
API keys grant access to the uncensored model via standard headers. Sign up with Google or email to receive your key instantly without phone verification.
- Base URL:
https://api.nsfwmax.com/v1 - Header:
Authorization: Bearer YOUR_API_KEY
curl https://api.nsfwmax.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a detailed list of top rated nsfw tools for indie devs"}]
}'Every request requires a valid key. If the key is missing or invalid, the API returns a 401 error. You can generate a new key at any time, which replaces the previous one.
First Request with OpenAI SDK
Send text in and receive text out using the standard chat-completions endpoint. The model id is uncensored and it supports JSON mode for structured outputs.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwmax.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 works with any OpenAI-compatible client. Adjust the base URL to point to our servers. The model handles complex prompts without refusing lawful adult content.
Node.js Integration
Integrate the NSFW chatbot capabilities directly into your Node applications. Use the official SDK to handle requests efficiently.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwmax.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);Ensure you pass the correct base URL. The API supports function calling and streaming, making it suitable for dynamic character interactions.
Streaming Responses
Enable real-time token generation using Server-Sent Events (SSE). Streaming reduces perceived latency for users building NSFW video or chat apps.
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)Token usage statistics appear in the final chunk. This approach keeps connections open until the model finishes generating the response up to 16,000 tokens.
Parameters and Configuration
Control creativity and output format with standard parameters. Set temperature for variance, top_p for nucleus sampling, and stop sequences to halt generation.
curl https://api.nsfwmax.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a detailed list of top rated nsfw tools for indie devs"}]
}'Use response_format with {"type": "json_object"} to enforce strict JSON outputs. The context window supports 100,000 tokens total, allowing for extensive context retention.
Limits and Error Handling
Monitor your usage to avoid service interruptions. The API enforces a limit of 300 requests per minute and allows 8 concurrent requests per key.
curl https://api.nsfwmax.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a detailed list of top rated nsfw tools for indie devs"}]
}'Returns 401 for invalid keys, 402 if prepaid credit is exhausted, and 429 for rate limits. Errors and refusals are free, so you only pay for actual token consumption.
Common questions
What is the context window for the uncensored model?
The context window is 100,000 tokens, counting both the prompt and the completion together. You can generate up to 16,000 tokens per request, which is ideal for long-form NSFW stories or detailed roleplays.
How do I pay for the NSFW LLM API?
We accept crypto only: USDT (TRC20) or USDC (Base). Top-ups range from $20 to $500, with bonus credit starting at $50. Credit never expires, and you pay only for tokens used.
Does the model refuse NSFW content?
The uncensored model is tuned to answer without content refusals for lawful adult use. It does not refuse controversial or explicit topics, though it will still block sexual content involving minors as a hard limit.
Get your API key
Sign up, copy your key, and update the base URL. That is all you need.
Claim trial key