EN ▾

NSFW GPT: First request in five minutes

Get your first uncensored LLM response in under five minutes using standard OpenAI-compatible clients. This guide covers authentication, text generation, and handling responses with the NSFW GPT API.

Base URL and Authentication

Start by configuring your client to point at our base URL. All requests require an API key passed in the Authorization header. You can generate this key instantly on the Get API key page using your Google account or email and password. No phone number or credit card is required for signup. Once created, the key is displayed immediately and is the only active key for your account; generating a new one replaces the old one.

Our API is an uncensored llm api designed for developers. It serves a single open-weight model tuned for adult content without content refusals for lawful uses. The model id you must send in every request is uncensored.

First Request

Test the endpoint with a simple curl command. This confirms your authentication works and returns a text response from the model. The endpoint is POST /v1/chat/completions. Ensure your base URL is set to https://api.nsfwgpt.top/v1.

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

The response includes the generated text and token usage. Note that errors and refusals do not incur charges, so you can test freely. The model does not refuse lawful adult, fictional, or controversial topics, but it will block sexual content involving minors.

Python SDK Integration

Use the official OpenAI Python SDK to integrate the uncensored ai api into your backend. Set the base_url and api_key before making calls. This approach works for any OpenAI-compatible client.

from openai import OpenAI

client = OpenAI(base_url="https://api.nsfwgpt.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 model id remains uncensored. You can adjust parameters like temperature and top_p to control creativity. The context window is 100,000 tokens total. If you do not set max_tokens, the response can run to the end of the window.

Node.js SDK Integration

For Node.js applications, configure the OpenAI SDK similarly. Initialize the client with your base URL and API key. This method is ideal for server-side rendering or API endpoints.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.nsfwgpt.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 API provides text only. There are no embeddings, image, audio, or video generation endpoints. The model is an uncensored ai models api solution for text-based adult content use cases. It is not GPT, Claude, or any other vendor's model.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Token usage information is included in the last chunk of the stream. This allows you to display responses in real time without waiting for the full completion.

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 billing. Errors and refusals are free, meaning you are not charged for incomplete streams or failed requests. The context window limit applies to the sum of prompt and completion tokens.

Limits, Errors, and Context

Monitor your usage against the defined limits. You are allowed 300 requests per minute per key and 8 concurrent requests. The request body must not exceed 8 MB. If you exceed the rate limit, the API returns a 429 Too Many Requests error. If you run out of prepaid credit, you receive a 402 error. An invalid or missing API key results in a 401 error. If the request body exceeds 8 MB, you will get a 400 error.

Errors and refusals do not incur charges, so streaming does not affect your prepaid balance unfairly. Credit never expires, and you can top up via crypto at any time.

What the API supports

A quick checklist for developers: format, limits, features, billing.

SpecValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.nsfwgpt.top/v1
AuthenticationBearer token in the Authorization header
StreamingYes — server-sent events; the last chunk carries token usage
Context window100,000 tokens, input and output combined
JSON moderesponse_format: {"type": "json_object"}
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Completion lengthprompt + 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
Max body8 MB request body
Billingprepaid credit, charged by real token usage; errors and refusals are free
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Subscriptionno monthly fee; paid credit does not expire
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
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Bonus credit+5% from $50, +10% from $100, +15% from $200
Content policyadult content allowed; sexual content involving minors is refused
Keysone active key per account; a new key replaces the old one
AccountGoogle or e-mail and password

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_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

What is the context window size?

The context window is 100,000 tokens for the sum of the prompt and completion. There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window.

How do I pay for the API?

We accept crypto only: USDT (TRC20) or USDC (Base). You can top up any whole amount from $20 to $500. Credit never expires and errors are free.

Is there a free trial?

Yes, new users get $0.50 of trial credit valid for 7 days, one per person. Claim this credit with one click on your API key page. No card or phone number is needed to sign up via Google or email.

Your key is one form away

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