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.
| Spec | Value |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Model ID | uncensored |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.nsfwgpt.top/v1 |
| Authentication | Bearer token in the Authorization header |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Context window | 100,000 tokens, input and output combined |
| JSON mode | response_format: {"type": "json_object"} |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Requests per minute | 300/min per key |
| Parallel requests | 8 requests at the same time per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | 8 MB request body |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Subscription | no 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 |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Keys | one active key per account; a new key replaces the old one |
| Account | Google or e-mail and password |
Error codes
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary 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.