Claim trial key

API Documentation

Get your API key and start sending prompts to the uncensored model immediately. This quickstart guides you through authentication, the chat endpoint, and streaming responses using standard OpenAI-compatible SDKs.

Authentication & Base URL

Your API key authenticates every request. Generate a key via the dashboard using Google or email; no phone number is required. Use this key in the Authorization header. The base URL for all requests is HTTPS://api.modelsnsfw.com/v1. This endpoint works with any OpenAI-compatible client by simply changing the base URL and providing your key.

curl https://api.modelsnsfw.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List all available nsfw model tiers and their monthly costs."}]
  }'

Chat Completions Endpoint

Send text and receive text via POST /v1/chat/completions. The model ID is uncensored. It is an open-weight model tuned for no refusals on lawful adult content. It is not GPT, Claude, or any other vendor model. Input tokens cost $0.15 per million; output tokens cost $0.50 per million. Errors are free.

from openai import OpenAI

client = OpenAI(base_url="https://api.modelsnsfw.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 (SSE)

Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE) with token usage in the final chunk. This is ideal for real-time chat interfaces. You receive partial tokens immediately. This reduces perceived latency for the user significantly.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.modelsnsfw.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);

Function Calling & JSON Mode

Use response_format: {"type": "json_object"} for structured output. You can also define tools for function calling. The model supports temperature, top_p, stop, and seed parameters. This ensures deterministic results when needed. JSON mode forces the output to valid JSON format.

Rate Limits & Constraints

You are limited to 300 requests per minute per key. Only 8 requests can run simultaneously. The request body must not exceed 8 MB. If you send too many requests, you receive a 429 error. Invalid keys return 401. Insufficient credit returns 402. Errors during processing do not consume your prepaid credit.

Token Usage & Billing

The context window is 100,000 tokens total. Max output is 16,000 tokens per request. If max_tokens is unset, it defaults to 2,048. Credits are prepaid and never expire. Top-ups are crypto-only (USDT/TRC20 or USDC/Base). Bonus credit applies for larger top-ups. No subscription is required.

Streaming

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)

FAQ

What is the NSFW API context window?

The context window is 100,000 tokens, combining both prompt and completion. You can request up to 16,000 tokens in a single output. This allows for long documents or detailed reasoning without truncation.

Why is my request failing with 402?

A 402 error means your prepaid credit is exhausted. You can top up instantly with USDT or USDC. Errors and refusals do not consume credit, so only successful completions are billed.

Is this an uncensored LLM for NSFW models generation?

Yes, the model is uncensored and does not refuse lawful adult content. It is an open-weight model, not GPT or Claude. It supports text generation for chatbots and data processing.

Get your key in one step

Sign up, grab your key, and update the endpoint. That is all.

Claim trial key