Get API key

Uncensored AI API Documentation

Get started with the uncensored AI API by connecting your existing OpenAI-compatible client to our single dedicated model. This guide covers authentication, integration, and streaming with no model routing or content filters for lawful adult use.

Authentication and Base URL

The uncensored LLM API uses standard OpenAI-compatible authentication. To begin, visit the Get API key page and sign in with Google or email. Your API key is displayed immediately and should be kept secure.

All requests must include your key in the Authorization header. The base URL for all endpoints is https://api.uncensoredaichatbot.cc/v1. We do not use model routing; we serve one dedicated uncensored large language model with the ID uncensored. This ensures predictable coding patterns without the overhead of generic API brokers.

First Request

Send a POST request to /v1/chat/completions to generate text. The uncensored API accepts standard parameters like temperature and top_p. It does not support embeddings, image, audio, or video generation. Only text-in, text-out is available.

Below is a minimal example using curl to request a response from the uncensored model.

curl https://api.uncensoredaichatbot.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."}]
  }'

The response will include token usage statistics. Note that errors and refusals do not consume your prepaid credit, so you can test safely.

Python SDK Integration

Use the official OpenAI Python SDK by pointing it to our base URL. This approach works for most existing OpenAI-compatible clients with minimal code changes. Set the base_url and provide your API key via the api_key parameter.

The uncensored AI models API supports the same parameter structure as the standard OpenAI API. You can adjust max_tokens, stop, and seed to control output behavior. The default output limit is 2,048 tokens unless you explicitly set a higher max_tokens value.

from openai import OpenAI

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

Ensure your SDK version is up to date to support streaming and JSON mode features correctly.

Node.js SDK Integration

For JavaScript environments, the Node SDK follows the same configuration pattern. Initialize the client with our base URL and your API key. This allows you to integrate the uncensored API into web apps, bots, or backend services easily.

The uncensored API supports function calling and JSON mode. You can define tools in your request and parse the output strictly. This is useful for building roleplay applications or data extraction pipelines that require structured outputs.

import OpenAI from "openai";

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

Handle errors gracefully. Invalid keys return 401, insufficient credit returns 402, and rate limits return 429.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Token usage statistics are included in the final chunk of the stream, allowing you to track costs in real time.

Streaming is ideal for roleplay applications where low latency improves the user experience. The uncensored AI API ensures that lawful adult content is delivered without intermediate filters interrupting the stream.

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)

Parse the SSE events to update your UI incrementally. Remember that the context window is shared between prompt and completion.

Limits, Errors, and Context Window

Your API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, you will receive a 429 error. Each account has one active key; generating a new key replaces the old one.

The context window is 64,000 tokens for prompt + completion combined. The maximum output per request is 16,000 tokens. If max_tokens is not set, the limit defaults to 2,048 tokens.

Errors like 401 (invalid key) and 402 (no credit) do not consume tokens. Credit is charged only for successful token usage. Prepaid credit never expires, and mistakes like double charges are handled via the Support page.

Questions and answers

Does the uncensored AI API support model routing?

No. We serve a single, dedicated uncensored large language model with the ID <code>uncensored</code>. This ensures consistent behavior and predictable coding patterns without the complexity of routing between multiple vendors.

How is pricing calculated?

Pricing is usage-based: $0.25 per 1M input tokens and $1.00 per 1M output tokens. Errors and refusals are free. Prepaid credit is topped up via crypto only and never expires.

What content is blocked?

The model does not refuse lawful adult, fictional, or controversial topics. However, a hard content limit always applies: sexual content involving minors is blocked and refused.

Your key is one form away

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

Get API key