API Documentation
Get started with the NSFW LLM online API using standard OpenAI-compatible endpoints. Send your first prompt in seconds with zero configuration.
Base URL and Authentication
The NSFW LLM online API operates on a single base URL: https://api.nsfwllmonline.com/v1. Authentication relies on a Bearer token passed via the Authorization header. You receive one active key per account, which you can regenerate immediately via the dashboard without losing your prepaid balance.
- Base URL:
https://api.nsfwllmonline.com/v1 - Header:
Authorization: Bearer YOUR_API_KEY
curl https://api.nsfwllmonline.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Return 200 ok json"}]
}'
Chat Completions Endpoint
Use POST /v1/chat/completions to generate text. Send a model ID of uncensored to access our open-weight model tuned for unrestricted responses. The API accepts standard message structures, allowing you to build context-rich conversations or simple single-turn queries.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwllmonline.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)
Supported Parameters
Control generation behavior with standard parameters like temperature, top_p, and stop. You can enforce JSON output using response_format or set a seed for reproducibility. The model supports a context window of 100,000 tokens, combining both input and output.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwllmonline.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);
Streaming Responses
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE) for real-time token delivery. Token usage metadata appears only in the final chunk, ensuring accurate billing tracking without blocking the response stream.
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 & JSON Mode
Use tool_choice and tools for function calling capabilities. For strict structured output, set response_format to {"type": "json_object"}. This ensures reliable parsing for automated pipelines without manual regex cleaning.
Rate Limits and Quotas
Each key allows 300 requests per minute and 8 concurrent requests. Requests exceeding 8 MB in body size are rejected. Common errors include 401 for invalid keys, 402 for insufficient prepaid credit, and 429 for rate limiting. The uncensored model refuses sexual content involving minors but allows other lawful adult topics.
Get your API key now
Register, copy the key, update your base URL. That is all there is to it.