EN ▾
Get API key
per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Unrestricted AI API Documentation

Start generating text with our uncensored LLM API using standard OpenAI-compatible endpoints. This quickstart guide covers authentication, basic requests, streaming, and essential limits to get your integration running immediately.

Base URL and Authentication

The Unrestricted AI API is hosted at https://api.unrestrictedai.top/v1. It follows the OpenAI chat completions structure, meaning you can use existing OpenAI SDKs by simply updating the base_url and providing your API key. You only need one active key per account, and it grants immediate access to the uncensored model. Authentication is handled via the Authorization header using the Bearer scheme. Ensure your key is kept secure, as it controls your prepaid credit usage. Unlike subscription services, you pay only for tokens processed, with errors and refusals billed at zero tokens.

Your First Request

Send a standard chat completion request to test connectivity. The model ID is always uncensored. This endpoint accepts text input and returns text output, supporting up to 100,000 tokens in the context window. If you do not specify max_tokens, the response can run to the end of the window. This simple POST request demonstrates the core functionality: sending a prompt and receiving a generated response without content filters for lawful adult or controversial topics.

Python SDK Integration

Using the official OpenAI Python library is the fastest way to integrate. Point the client to our base URL and pass your key. The code below shows a basic synchronous request. This approach handles JSON parsing automatically, allowing you to access the response content directly in your Python variables. It is ideal for backend services or batch processing where streaming latency is less critical than code simplicity.

Node.js SDK Integration

For JavaScript environments, configure the OpenAI Node.js client to target our endpoint. The asynchronous nature of Node.js pairs well with the API's response time. Set the base URL correctly, and the SDK will handle the request formatting. Remember that this API does not support image, audio, or embedding endpoints, so stick to text-based completions. This method is suitable for web servers or edge functions where you need to inject uncensored LLM responses into dynamic content.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns data via Server-Sent Events (SSE), allowing you to receive tokens in real-time. Token usage and billing metrics are included in the final chunk of the stream. This reduces perceived latency for end-users, especially for long outputs. Streaming is recommended for chat interfaces where immediate text rendering improves the user experience. Monitor the final chunk for total token counts to track your prepaid credit accurately.

Limits, Errors, and Context

Each API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. Common errors include 401 for invalid keys, 402 when prepaid credit is exhausted, and 429 for rate limits. The context window supports 100,000 tokens total, including both prompt and completion. If you exceed these limits, implement exponential backoff. Credit never expires, and mistakes like double charges are handled via the Support page, ensuring you retain your prepaid value indefinitely.

cURL

curl https://api.unrestrictedai.top/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.unrestrictedai.top/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.unrestrictedai.top/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)

API specifications

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

SpecValue
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
AuthenticationAuthorization: Bearer YOUR_KEY
Base URLhttps://api.unrestrictedai.top/v1
JSON moderesponse_format: {"type": "json_object"}
SSE streamingYes — server-sent events; the last chunk carries token usage
Max context100,000 tokens (prompt + completion together)
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Concurrency8 requests at the same time per key
Max body8 MB request body
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Credit expirypaid credit never expires, no subscription
Billingprepaid credit, charged by real token usage; errors and refusals are free
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
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
Content policyadult content allowed; sexual content involving minors is refused
Key managementone active key per account; a new key replaces the old one
Sign-inGoogle or e-mail and password

Errors and what to do

Every error is JSON with a type you can switch on. You are never charged for an error.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

How is billing calculated?

You are charged $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals do not consume tokens, so they are free. Credit is prepaid and never expires.

What payment methods are accepted?

We accept crypto (USDT on TRC20, USDC on Base). Minimum top-up is $20, and bonuses apply for larger amounts. PayPal is not supported.

Does the API filter content?

The model is uncensored and does not refuse lawful adult, fictional, or controversial topics. However, sexual content involving minors is always blocked. Prompts are not used for training.

Your key is one form away

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

Get API key