EN ▾
Open account

Unscensored ai API Documentation

Unscensored AI provides a direct, OpenAI-compatible API for developers who need an uncensored LLM without content filters. This documentation covers the chat-completions endpoint, authentication, and pricing for building NSFW or unrestricted applications.

Authentication and base URL setup

Unscensored AI uses standard API key authentication via the Authorization header.

Generate your key on the dashboard using Google or email. The base URL is https://api.unscensoredai.com/v1.

Send your key as a Bearer token. Include the header in every request to identify your account.

curl https://api.unscensoredai.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Send me to the server now."}]
  }'

Chat completions endpoint guide

The primary endpoint is POST /v1/chat/completions. It accepts text input and returns text output.

Specify the model as "uncensored". This model does not refuse lawful adult or controversial topics.

Send messages in the standard OpenAI format. The API processes your prompt and returns a completion.

from openai import OpenAI

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

Streaming responses with SSE

Enable streaming by setting "stream": true in your request body.

The API returns Server-Sent Events (SSE). Each chunk contains partial token data.

Check the final chunk for total token usage. This method reduces perceived latency for long responses.

import OpenAI from "openai";

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

Function calling and JSON mode

Use function calling for structured tool interactions. Define tools in the request body.

Enable JSON mode with "response_format": {"type": "json_object"} for consistent outputs.

Set temperature and top_p to control randomness. These parameters affect response variability.

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 and error handling

Expect 401 errors if the API key is invalid. 402 errors indicate insufficient prepaid credit.

Rate limits are 300 requests per minute and 8 concurrent requests per key. Respect these limits to avoid 429 errors.

The context window is 100,000 tokens. Request bodies must be under 8 MB.

Handle errors by checking status codes. Retry 429s with exponential backoff.

Token pricing calculator

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens.

Errors and refusals are free. You only pay for actual token usage.

Top up via crypto. Credits never expire. Use the calculator below to estimate costs.

Input your expected token volume. The API charges based on real usage.

Common questions

Is Unscensored AI the same as OpenAI?

No, it is an independent service using a different open-weight model. It is compatible with the OpenAI API format but not a reseller of GPT models.

Can I use this for NSFW content?

Yes, the model is uncensored and does not refuse lawful adult content. It only blocks sexual content involving minors.

How do I pay for the API?

Pay with USDT (TRC20) or USDC (Base). Top-ups start at $20. Credits do not expire and errors are free.

Your API key is one step away

Sign up, copy the key, update your base URL. That is all the setup required.