EN ▾

Uncensored LLM API for developers.

Get API key

Unrestricted AI Models: Quickstart: Integrate the Uncensored LLM

Integrate our uncensored llm into your application using the standard OpenAI-compatible API. This quickstart guides you from authentication to streaming responses with concrete code examples.

Authentication and Base URL

Connect to the unrestricted ai models API by setting the base URL to https://api.unrestrictedaimodels.cc/v1. Pass your API key in the Authorization header as a Bearer token. You receive this key immediately after signing up via Google or email on the Get API key page. The system uses one active key per account; generating a new key invalidates the previous one.

Basic Completion Request

Send a standard chat completion request to the /v1/chat/completions endpoint. Specify the model ID as uncensored. The API returns a text response based on your prompt. This endpoint does not support embeddings, image, or audio generation. Use the following curl command to verify connectivity:

curl https://api.unrestrictedaimodels.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 SDK to interact with the endpoint. Configure the client with your API key and the custom base URL. This approach is recommended for server-side applications where you need to manage context windows and parameters programmatically. The SDK handles serialization and retry logic automatically.

from openai import OpenAI

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

Integrate the API into Node.js applications by initializing the OpenAI client with the correct base URL. This allows you to build dynamic prompts and handle responses efficiently in JavaScript or TypeScript environments. The client supports the same parameters as the REST API, including temperature and stop sequences.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream of partial responses. This is ideal for real-time user interfaces. The final chunk of the stream contains the total token usage statistics. Streaming reduces perceived latency by delivering tokens as they are generated.

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)

Limits, Errors, and Context

The context window is 100,000 tokens total, with no separate output cap. You are limited to 300 requests per minute and 8 concurrent requests per key. Common errors include 401 for invalid keys, 402 when prepaid credit is exhausted, and 429 for rate limits. Errors do not consume credit. The model refuses sexual content involving minors but allows other lawful adult content.

Under the hood: specs

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

SpecValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.unrestrictedaimodels.cc/v1
API keyBearer token in the Authorization header
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
SSE streamingSupported (stream: true), usage included at the end
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Max context100,000 tokens (prompt + completion together)
JSON modeJSON object mode via response_format json_object
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
Requests per minute300 requests per minute per key
Request sizeup to 8 MB per request
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Parallel requests8 requests at the same time per key
Credit expirypaid credit never expires, no subscription
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
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
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
How you payprepaid credit, charged by real token usage; errors and refusals are free
Key managementone active key per account; a new key replaces the old one
Contentadult content allowed; sexual content involving minors is refused
Accountsign in with Google or with e-mail + password

When a request fails

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

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
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_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What is the context window size?

The context window is 100,000 tokens, combining both the prompt and the completion. If you do not specify max_tokens, the response can run to the end of the window.

How does pricing work?

You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid by crypto (USDT or USDC) and never expires. Errors and refusals are free. There are no monthly subscriptions or base fees.

Can I use this with the official OpenAI SDKs?

Yes. The API is OpenAI-compatible. You only need to change the base_url and provide your API key. The model ID is uncensored. This works with any standard OpenAI-compatible client library.

Your key is one form away

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