EN ▾
Get API key

Unrestricted AI Chat: Uncensored AI API Documentation

This guide walks you through integrating the uncensored AI API into your application using standard OpenAI-compatible protocols. You will learn how to authenticate, send requests, handle streaming, and manage limits.

Base URL and Authentication

Our API follows the OpenAI protocol structure, allowing you to use existing SDKs with minimal configuration. The base URL is https://api.unrestrictedaichat.com/v1. You will receive a single API key upon signup, which you can generate via the "Get API key" page using your Google account or email.

Pass this key in the Authorization header as a Bearer token. The API key is unique to your account; generating a new one invalidates the previous key. There is no phone number required for setup, and the key is displayed immediately after creation.

Below is a basic cURL request to verify your authentication and model access.

Chat Completions Endpoint

The core functionality is provided by the POST /v1/chat/completions endpoint. This endpoint accepts a list of messages and returns a text response. It does not support embeddings, images, audio, or fine-tuning. The model identifier to use is uncensored.

Requests are processed as raw text completion. The model is open-weight and tuned to answer without content refusals for lawful adult use. You can define the conversation history using the messages array, where each message has a role (user, assistant, or system) and content.

Use this cURL command to send your first completion request.

Python SDK Integration

For Python developers, the official openai package works out of the box. You only need to set the base_url and api_key environment variables or pass them directly to the client constructor. This ensures your code remains portable if you switch providers later, though you are locked into the specific model behavior of this endpoint.

Initialize the client with your key and point it to our base URL. The rest of the SDK calls mirror standard OpenAI patterns. This approach keeps your integration clean and reduces boilerplate code.

Node.js SDK Usage

Node.js developers can use the openai npm package in the same manner as Python. Configure the client with the correct base URL and API key. This allows you to leverage the rich ecosystem of OpenAI-compatible libraries for Node.js.

Simply instantiate the OpenAI client with your credentials and the base URL. The rest of the API calls, such as chat.completions.create, function identically to the standard OpenAI implementation. This makes it easy to drop our uncensored model into your existing Node.js applications.

Streaming Responses

For real-time user experiences, enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text updates, allowing your application to render tokens as they are generated.

The final chunk in the stream includes token usage statistics, so you can track costs accurately. Streaming is useful for chat interfaces where you want to show progress immediately. It reduces perceived latency for the end-user.

Limits, Errors, and Context Window

Your API key is limited to 300 requests per minute and 8 concurrent requests. The request body cannot exceed 8 MB. If you exceed these limits, you will receive a 429 Too Many Requests error. A 401 error indicates an invalid or expired key, while a 402 error means you have insufficient prepaid credit.

The context window is 100,000 tokens, combining prompt and completion. There is no separate output cap (if max_tokens is unset, the response can run to the end of the window). Errors and refusals are free, so you only pay for successful token generation. Prepaid credit never expires, and no card is needed for the trial.

cURL

curl https://api.unrestrictedaichat.com/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.unrestrictedaichat.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)

Node.js

import OpenAI from "openai";

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

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)

Questions and answers

What is the model used for this API?

The API serves a single open-weight model identified as "uncensored." It is run on our own servers and is not GPT, Claude, Gemini, or any other vendor's model. It is tuned to answer without content refusals for lawful adult use.

How do I get started with a trial?

New users get $0.50 of trial credit, one per person, valid for 7 days. Claim this credit with one click on your API key page. No credit card is needed. You can sign up using your Google account or an email and password on the Get API key page.

What payment methods are accepted?

We accept top-ups by crypto (USDT on TRC20, USDC on Base). You can top up any whole amount from $20 to $500. No cards are needed to sign up or for the trial.

Your key is one form away

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

Get API key

API specifications

A quick checklist for developers: format, limits, features, billing.

SpecValue
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
Modeluncensored
Base URLhttps://api.unrestrictedaichat.com/v1
EndpointsPOST /v1/chat/completions · GET /v1/models
API keyBearer token in the Authorization header
Structured outputJSON object mode via response_format json_object
Context window100,000 tokens (prompt + completion together)
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
SSE streamingYes — server-sent events; the last chunk carries token usage
Requests per minute300/min per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Concurrency8 requests at the same time per key
Max body8 MB request body
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Credit expirypaid credit never expires, no subscription
Accountsign in with Google or with e-mail + password
Keysone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused

Error reference

The type field is stable, the message is for humans. Errors cost nothing.

HTTPTypeWhat to do
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_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds