EN ▾
Get API key

Integrate the Uncensored NSFW API

Get started with the uncensored LLM API in minutes. Use our standard OpenAI-compatible endpoint to send text and receive unfiltered responses with zero configuration overhead.

Authentication and Base URL

To begin using the api nsfw service, you need an API key. Sign up via Google or email on the Get API key page to receive your key instantly. No credit card is required for the initial trial. Your key authenticates all requests to our base URL.

Base URL: https://api.nsfwapi.cc/v1

Append your API key to the Authorization header as a Bearer token. The API uses the standard OpenAI-compatible format, meaning you can use existing OpenAI SDKs by simply pointing them to our base URL. There is no complex routing or model selection; we serve a single high-performance uncensored model identified as uncensored.

First Request

Make your first API call to verify connectivity and response quality. The endpoint POST /v1/chat/completions accepts standard chat completion parameters. Our model, uncensored, is tuned to answer without content refusals for lawful adult use. It is an open-weight model running on our infrastructure, distinct from GPT, Claude, or other vendor models.

  • Context Window: 100,000 tokens total (prompt + completion).
  • Max Output: up to the end of the 100,000-token window.

Below is a basic cURL example to send a simple prompt.

curl https://api.nsfwapi.cc/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 SDK Integration

For Python developers, use the official openai library. Configure the client to point to our base URL and supply your API key. This approach allows you to leverage existing codebases while gaining access to our uncensored model capabilities.

Ensure you install the latest version of the OpenAI Python package. The SDK handles tokenization and JSON serialization automatically. You can set the model to uncensored to ensure you are hitting our specific endpoint.

from openai import OpenAI

client = OpenAI(base_url="https://api.nsfwapi.cc/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 SDK Integration

Node.js developers can integrate using the openai npm package. Similar to Python, you must override the base URL to direct requests to https://api.nsfwapi.cc/v1. This ensures you are using our uncensored infrastructure rather than the default OpenAI endpoints.

The Node SDK supports both promise-based and async/await patterns. You can pass standard parameters like temperature and top_p to control response randomness. This method is ideal for server-side applications requiring low-latency text generation.

import OpenAI from "openai";

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

For real-time user experiences, enable streaming by setting stream: true. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text, allowing you to render responses as they are generated. Token usage statistics are included in the final chunk of the stream.

Streaming is supported by all our SDKs. It reduces perceived latency significantly for long-form content. Ensure your client properly handles the end-of-stream event to close connections cleanly.

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)

Limits, Errors, and Context

Our uncensored AI API enforces strict limits to ensure stability. You are allowed 300 requests per minute per key and 8 concurrent requests. The maximum request body size is 8 MB. Errors are standard HTTP codes: 401 for invalid keys, 402 if prepaid credit is exhausted, and 429 for rate limits. Errors and refusals do not consume credit. The context window is 100k tokens total. If you exceed these limits, wait or optimize your prompt size.

Technical reference

Use this table to decide whether the API fits your project before you buy credit.

ItemValue
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.nsfwapi.cc/v1
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
API keyAuthorization: Bearer YOUR_KEY
StreamingYes — server-sent events; the last chunk carries token usage
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
JSON modeJSON object mode via response_format json_object
Max context100,000 tokens, input and output combined
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Concurrency8 requests at the same time per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300 requests per minute per key
Max bodyup to 8 MB per request
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Free trial$0.50 of credit valid 7 days, no card needed · 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% on $50+, +10% on $100+, +15% on $200+
Credit expiryno monthly fee; paid credit does not expire
Sign-insign in with Google or with e-mail + password
Key managementone active key per account; a new key replaces the old one
Content policyadult content allowed; sexual content involving minors is refused

HTTP errors

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

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
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 is the cost for the uncensored LLM API?

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

Does the API support function calling and JSON mode?

Yes. You can use tools and tool_choice for function calling. Set response_format to {"type": "json_object"} to enforce strict JSON output.

How do I top up my account?

Top up using USDT (TRC20) or USDC (Base) via the dashboard. Minimum top-up is $20. Bonuses of +5% from $50, +10% from $100, and +15% from $200 apply.

Your key is one form away

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

Start with trial credit

Email and password, key on screen right away.