EN ▾

NSFW Chat: Uncensored LLM API Documentation

Integrate the uncensored LLM API into your NSFW chat application with this quickstart guide. Send text to the chat-completions endpoint and receive raw, unrestricted model responses.

Base URL and Authentication

Start by pointing your OpenAI-compatible client to the base URL https://api.nsfwchat.top/v1. Authenticate every request by including your API key in the Authorization header as a Bearer token. You can generate this key immediately after signing up via Google or email on the Get API key page. The key is displayed once upon creation, so save it securely. This single key is tied to your account’s prepaid credit and request limits.

First Request

Send a standard chat-completions request to test connectivity and response quality. Use the model ID uncensored to access the open-weight model tuned for adult content. The API accepts text input and returns text output. Ensure your payload includes the messages array and the model field. This basic call verifies that your authentication and base URL configuration are correct before you build your application logic.

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Set the base_url and api_key environment variables or pass them directly to the client constructor. Call chat.completions.create with the model uncensored. This approach leverages existing community code for NSFW chat applications. The SDK handles serialization and error parsing, allowing you to focus on prompt engineering and message history management within your Python environment.

Node SDK Integration

For JavaScript or TypeScript applications, initialize the OpenAI client with your base URL and API key. The Node SDK is asynchronous by default, returning promises for all API calls. Invoke chat.completions.create to send your conversation history. This integration is ideal for web servers or Node-based game backends that require non-blocking I/O. Handle the response object to extract the assistant's reply and update your local state or database.

Streaming Responses via SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) as the model generates text. Each chunk contains partial deltas. The final chunk includes the token usage statistics for the request. This method reduces perceived latency for users in NSFW chat interfaces by displaying text as it is generated. Process each event in your client to update the UI in real time.

Limits, Errors, and Context Window

The context window supports up to 100,000 tokens for prompt and completion combined. Your request body must not exceed 8 MB. You are limited to 300 requests per minute and 8 concurrent requests per key. If your prepaid credit is exhausted, the API rejects further requests. Authentication failures return a 401 error, and rate limits trigger a 429 response. Ensure your application handles these errors gracefully to maintain a smooth user experience during high traffic periods.

cURL

curl https://api.nsfwchat.top/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."}]
  }'

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

Specs at a glance

If your tool speaks the OpenAI API, these are the details that matter.

ItemValue
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
Modeluncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
API keyBearer token in the Authorization header
Base URLhttps://api.nsfwchat.top/v1
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens, input and output combined
StreamingSupported (stream: true), usage included at the end
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Structured outputJSON object mode via response_format json_object
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Max bodyup to 8 MB per request
Concurrencyup to 8 in parallel per key
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
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
Billingprepaid credit, charged by real token usage; errors and refusals are free
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Subscriptionpaid credit never expires, no subscription
Key managementone active key per account; a new key replaces the old one
Accountsign in with Google or with e-mail + password
Contentuncensored for adults; the only hard rule: no sexual content involving minors

Error reference

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What model ID should I use?

Use the model ID uncensored. This is an open-weight model hosted on our servers, distinct from GPT, Claude, or other vendor models.

Does the API support function calling?

Yes, the API supports function calling (tools and tool_choice) along with JSON mode for structured outputs. You can define tools in your request payload.

Is there a content filter for minors?

A hard content limit applies: requests containing sexual content involving minors are always refused, regardless of the prompt context.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key