EN ▾
Get API key

Uncensored AI Chat API Documentation

The Uncensored AI Chat API delivers a single, high-performance uncensored model via a standard OpenAI-compatible interface, enabling developers to integrate NSFW-tolerant text generation into their applications without content filters.

Base URL and Authentication

Connect to the uncensored ai api using the standard OpenAI-compatible base URL. You need an API key to authenticate your requests. Sign up via Google or email on the key page to receive your token immediately. The base URL is https://api.uncensoredaichat.cc/v1.

Set the Authorization header to Bearer YOUR_API_KEY. This works with any OpenAI SDK or compatible client. The endpoint for available models is GET /v1/models, which returns the model ID uncensored. Use this ID in your completion requests. Errors like 401 indicate an invalid or missing key.

First Request

Send a chat completion request to POST /v1/chat/completions. The model ID is uncensored. The API accepts standard message structures. You can send prompts and receive text responses. This is a text-only API; it does not support images, audio, or embeddings.

The uncensored ai chat model handles open-weight inference on our servers. It is tuned to answer without refusals for lawful adult content. Ensure your payload includes the model, messages, and max_tokens fields. Adjust max_tokens to control output length, and if it is omitted, the response can run to the end of the window.

Python SDK Integration

Use the official OpenAI Python library to interact with the NSFW LLM API. Configure the client with the base URL and your API key. This approach keeps your codebase clean and leverages existing SDK patterns.

Set the model to uncensored in your client configuration. The SDK handles serialization and request formatting automatically. You can pass parameters like temperature and top_p to control generation behavior. This method is ideal for backend services or scripts that need reliable text generation.

Node SDK Integration

Integrate the uncensored api into your Node.js applications using the OpenAI Node SDK. Initialize the client with the custom base URL and your API key. This setup allows you to use familiar methods like chat.completions.create.

Pass the model ID uncensored to specify the uncensored model. You can define system prompts, user messages, and assistant responses. The SDK manages the HTTP requests efficiently. This is suitable for web servers or edge functions that require on-demand text generation without external dependencies beyond the standard SDK.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. This reduces perceived latency for end-users. Each chunk contains partial text updates.

The final chunk includes token usage statistics. This allows you to track costs accurately without storing the entire response. Streaming is supported for both Python and Node SDKs. It is optimal for chat interfaces where immediate feedback is required. The uncensored ai chat model supports this for high-performance interaction.

Limits, Errors, and Context

The context window is 100,000 tokens total (prompt + completion). There is no separate output cap. Errors and refusals do not consume credit. A 401 error means your key is invalid. A 429 error indicates you have exceeded 300 requests per minute or 8 concurrent requests. Rate limits are per key. Request bodies must be under 8 MB. Credit is charged only for successful token usage. Prepaid credit never expires.

cURL

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

from openai import OpenAI

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

import OpenAI from "openai";

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

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)

Capabilities and limits

Everything the endpoint can and cannot do, in one place — check it before you top up.

ItemValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Model IDuncensored
Base URLhttps://api.uncensoredaichat.cc/v1
API keyBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Max context100,000 tokens, input and output combined
StreamingSupported (stream: true), usage included at the end
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Structured outputJSON object mode via response_format json_object
Concurrency8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Requests per minute300/min per key
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
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Billingprepaid credit, charged by real token usage; errors and refusals are free
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Subscriptionpaid credit never expires, no subscription
Keysone key per account, regenerate any time (the old one stops working)
Sign-inGoogle or e-mail and password
Content policyadult content allowed; sexual content involving minors is refused

HTTP errors

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
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_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Does the uncensored ai chat API support image or audio generation?

No, the API is text-only. It serves a single large language model for chat completions. It does not support embeddings, image generation, audio, or video. Use this API for text-based interactions and roleplay.

How is credit charged and when are errors free?

Credit is charged based on real token usage for successful completions. Errors such as 401 invalid key or 429 rate limit do not consume credit. Refusals of content also do not charge tokens. Prepaid credit never expires.

What is the maximum context window and output length?

The total context window is 100,000 tokens, including both the prompt and the completion. There is no separate output cap per request. If max_tokens is not set, the response can run to the end of the window.

Your key is one form away

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