EN ▾
NSFW WriterUncensored API. No Refusals. Pay Per Use.Get API key

https://api.nsfwwriter.top/v12026

nsfwwriter.top

Quickstart: Integrate the Uncensored API

Integrate the NSFW Writer uncensored API in minutes using standard OpenAI-compatible endpoints. Get raw, unfiltered text responses with minimal setup and direct API control.

Base URL and Authentication

The NSFW Writer API is an OpenAI-compatible service. You interact with it using standard HTTP requests. The base URL is https://api.nsfwwriter.top/v1. To authenticate, include your API key in the Authorization header as a Bearer token. This key is generated when you sign up via Google or email on the Get API key page. Ensure your client library is configured to use this base URL instead of the default OpenAI endpoint.

The /v1/chat/completions Endpoint

Send requests to POST /v1/chat/completions. The model identifier is uncensored. This endpoint accepts a list of messages and returns text completions. It supports parameters like temperature, top_p, stop, seed, presence_penalty, and frequency_penalty. The model does not refuse lawful adult, fictional, or controversial topics. Note that sexual content involving minors is always blocked. You can test the integration with a simple request:

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

Ensure you replace YOUR_API_KEY with your actual key. The response will contain the generated text in the choices array.

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Install the package via pip and configure the client with our base URL and API key. This allows you to leverage existing code patterns while benefiting from our uncensored model. The following snippet demonstrates a basic chat completion call:

from openai import OpenAI

client = OpenAI(base_url="https://api.nsfwwriter.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 context window is 100,000 tokens total. There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window. Errors and refusals do not consume credit.

Node.js SDK Integration

For JavaScript and TypeScript developers, the OpenAI Node.js SDK works seamlessly. Set the baseURL to our endpoint and provide your API key. This approach is ideal for web servers or backend services requiring uncensored text generation. Configure the client as shown below:

import OpenAI from "openai";

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

Remember that the model ID is uncensored. You can pass system, user, and assistant messages to guide the response. The API returns JSON, making it easy to parse in Node environments.

Streaming Responses via SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. This is useful for chat applications where you want to display text as it is generated. The final chunk contains the full token usage statistics. Use this feature to reduce perceived latency for your 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)

Streaming does not change pricing. You are charged for the total input and output tokens generated, regardless of streaming.

Rate Limits, Errors, and Context

Your API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. If you create a new key, it replaces the old one. Errors such as invalid keys or insufficient funds are handled by the API, but specific HTTP status codes may vary by client. Refusals for minor sexual content are always enforced. The context window is 100,000 tokens, with no separate output cap. Prompt + completion tokens count against your 100k limit.

Capabilities and limits

The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.

ItemValue
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.nsfwwriter.top/v1
Model IDuncensored
AuthenticationAuthorization: Bearer YOUR_KEY
MethodsPOST /v1/chat/completions · GET /v1/models
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingSupported (stream: true), usage included at the end
Context window100,000 tokens (prompt + completion together)
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
JSON moderesponse_format: {"type": "json_object"}
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Requests per minute300/min per key
Parallel requests8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request sizeup to 8 MB per request
Credit expirypaid credit never expires, no subscription
Trial credit$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
Bonus credit+5% from $50, +10% from $100, +15% from $200
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
How you payprepaid credit, charged by real token usage; errors and refusals are free
Keysone key per account, regenerate any time (the old one stops working)
Sign-inGoogle or e-mail and password
Contentadult content allowed; sexual content involving minors is refused

Error codes

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_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What model does the NSFW Writer API use?

It uses a single open-weight uncensored model hosted on our servers. It is not GPT, Claude, or any other vendor's model. It is tuned to answer without content refusals for lawful adult use.

How is pricing calculated?

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free. Credit is prepaid via crypto and never expires.

Can I use this for NSFW chatbots?

Yes, the API is designed for NSFW and uncensored applications. It does not refuse lawful adult, fictional, or controversial topics. Only sexual content involving minors is blocked.

Your key is one form away

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

Get API keyRead the docs