EN ▾
Get API key

First request in five minutes

Integrate our uncensored chat completions API in minutes using standard OpenAI client libraries. Switch base URLs and keys to start generating text without content refusals.

Base URL and Authentication

Our API follows the OpenAI chat completions standard, meaning you can use existing SDKs with minimal changes. The base URL is https://api.openainsfw.cc/v1. Authentication uses the standard Authorization: Bearer header with your API key.

Sign up via Google or email to receive your key immediately. The key is tied to one account; generating a new key replaces the old one. There are no monthly subscriptions, only prepaid credit charged by real token usage.

Basic Completion Request

Send a POST request to /v1/chat/completions with your model ID set to uncensored. The model accepts text input and returns text output. It does not support images, audio, or embeddings.

Ensure your requests stay within the 8 MB body limit. Errors and refusals do not consume your prepaid credit.

curl https://api.openainsfw.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

Use the official openai Python package. Override the base_url and api_key to point to our servers. This allows you to keep your existing application logic while accessing an uncensored model for lawful adult or controversial topics.

The model ID remains uncensored. You can adjust parameters like temperature and top_p to control creativity and determinism.

from openai import OpenAI

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

Initialize the OpenAI client with your custom base URL and API key. The structure mirrors the standard OpenAI interface, making migration straightforward.

Call chat.completions.create with the uncensored model. You can enable JSON mode or function calling as needed. The SDK handles serialization automatically.

import OpenAI from "openai";

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

Set stream: true to receive Server-Sent Events (SSE). The API returns chunks of text as they are generated. Token usage information is included in the final chunk of the stream.

This method reduces perceived latency for long responses. Monitor the stream for the final chunk to know when the request is complete.

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)

Rate Limits, Errors, and Constraints

Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum input context window is 100,000 tokens (prompt + completion). There is no separate output cap, and if max_tokens is unset, the response can run to the end of the window.

Handle standard HTTP errors: 401 indicates an invalid key, 402 means your prepaid credit is exhausted, and 429 signals rate limiting. Content involving minors is always refused.

Questions and answers

Does this API support image or audio generation?

No. This is a text-only chat completions API. It does not support embeddings, image generation, audio, or fine-tuning.

How do I top up my credit?

Top-ups are crypto-only (USDT on TRC20 or USDC on Base). You can add any whole amount from $20 to $500. Credit never expires.

Is there a free trial?

Yes. New accounts receive $0.50 of trial credit valid for 7 days. Claim this credit with one click on your API key page. No credit card is required to start.

Your key is one form away

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

What the API supports

Before you integrate, here is exactly what you get with a key.

ParameterDetails
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.openainsfw.cc/v1
Model IDuncensored
API keyBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
JSON modeJSON object mode via response_format json_object
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
SSE streamingSupported (stream: true), usage included at the end
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Max context100,000 tokens, input and output combined
Parallel requestsup to 8 in parallel per key
Rate limit300/min per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request sizeup to 8 MB per request
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Credit expiryno monthly fee; paid credit does not expire
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
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Contentadult content allowed; sexual content involving minors is refused
Keysone key per account, regenerate any time (the old one stops working)
AccountGoogle or e-mail and password

Errors and what to do

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

HTTPTypeWhat to do
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_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 · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Start with trial credit

Email and password, key on screen right away.