EN ▾
Get API key

NSFW Model API Quickstart Guide

Get started with the uncensored LLM API in minutes. This guide covers authentication, basic requests, streaming, and integration with Python and Node.js clients.

Base URL and Authentication

The API endpoint is https://api.nsfwmodel.top/v1. It is fully compatible with OpenAI SDKs. You need an API key to authenticate requests. Sign up with Google or email to get your key instantly. Keep it secure.

Pass the key in the Authorization header. Use the model ID uncensored for all requests. This model is tuned to answer without content refusals for lawful adult use. It is not GPT, Claude, or any other vendor model. It is an open-weight model run on our servers.

Basic Completion Request

Send a POST request to /v1/chat/completions. Include your key, the model ID, and the message content. The API returns text output. It is a pure text API. No images or audio.

Here is a standard request using curl:

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

This returns a completion object. You can parse the response text for your application. It is the simplest way to start using an uncensored model without running local GPUs.

Python SDK Integration

Use the official OpenAI Python library. Set the base URL to our endpoint. Pass your API key. This makes integration straightforward for Python developers.

from openai import OpenAI

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

The code above sends a simple prompt. The response contains the generated text. You can handle errors like rate limits or invalid keys. This approach works for any OpenAI-compatible client. It is reliable and low-latency.

Node SDK Integration

Install the OpenAI Node.js package. Configure the base URL and API key. This allows you to use the API in JavaScript or TypeScript projects.

import OpenAI from "openai";

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

This snippet demonstrates a basic chat completion. The response is returned as a stream or object. You can integrate this into web servers or scripts. It is ideal for indie creators who need uncensored text generation.

Streaming Responses

Enable streaming by setting stream: true. The API sends Server-Sent Events (SSE). You receive tokens incrementally. This improves perceived latency for users.

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)

Process each chunk as it arrives. The final chunk includes token usage data. This is useful for real-time applications. It allows you to display text as it is generated. The uncensored model supports this feature without extra cost.

Limits, Errors, and Context

The context window is 100,000 tokens. There is no separate output cap per request. You can send up to 300 requests per minute. Concurrency is limited to 8 simultaneous requests per key.

Common errors include 401 (invalid key), 402 (no credit), and 429 (rate limit). Errors and refusals are free. Credit is charged only for real token usage. The base request body size is 8 MB. Plan your inputs accordingly.

Questions and answers

Is the uncensored model the same as GPT-4?

No. It is an open-weight model tuned for uncensored responses. It is not GPT, Claude, or any other vendor model. It is run on our servers.

How do I pay for the API?

You top up with crypto only. We accept USDT (TRC20) or USDC (Base). Payments range from $20 to $500. No cards or PayPal are accepted.

What is the trial offer?

New accounts get $0.50 of trial credit. It is valid for 7 days. Claim this credit with one click on your API key page. No credit card is needed. One trial per person.

Your key is one form away

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

Get API key

Capabilities and limits

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

FeatureSupport
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.nsfwmodel.top/v1
API keyAuthorization: Bearer YOUR_KEY
Modeluncensored
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens (prompt + completion together)
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Structured outputJSON object mode via response_format json_object
StreamingYes — server-sent events; the last chunk carries token usage
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Requests per minute300 requests per minute per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Parallel requests8 requests at the same time per key
Max bodyup to 8 MB per request
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
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Volume bonus+5% from $50, +10% from $100, +15% from $200
Subscriptionpaid credit never expires, no subscription
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone key per account, regenerate any time (the old one stops working)
Sign-insign in with Google or with e-mail + password

HTTP errors

Errors come back as JSON with a stable type; failed and refused requests are not billed.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds