EN ▾
https://api.unrestrictedaiapi.com/v1uncensored2026-10-06
Get API key

Unrestricted AI API: Uncensored LLM API Quickstart Guide

This quickstart guide shows you how to connect your application to the Unrestricted AI API. You will learn to send requests, handle streaming responses, and manage your account limits using standard OpenAI-compatible formats.

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

Authentication and Base URL

Start by generating an API key on the Get API key page. You need only an email and password; no credit card is required for the trial. Use your key in the Authorization header as a Bearer token. All requests must target the base URL https://api.unrestrictedaiapi.com/v1.

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

Eligible accounts can request $0.50 of trial credit for 7 days. Verification and processing may be required. Check the available balance before making requests. Each account has one active key; regenerating it revokes the old one.

Chat Completions Endpoint

Send text to POST /v1/chat/completions with model ID uncensored. Inspect the returned message and usage fields. This is an independent text model, not a proxy for GPT or Claude.

from openai import OpenAI

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

Responses are standard text outputs. The model supports a 100,000 token context window for combined prompt and completion. You can send tools definitions for function calling, which the model will respect in its output format.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) chunks. This allows your application to display tokens as they generate, reducing perceived latency for long responses.

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)

Each chunk contains partial text. Your client must aggregate these chunks to reconstruct the final message. This method works with any OpenAI-compatible SDK that supports streaming protocols.

Tool Calling Support

The API supports tool calling via the tools parameter. Define your functions in the request, and the model will return structured JSON output when appropriate. This allows integration with external systems or custom logic.

import OpenAI from "openai";

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

Parse the model's response to extract tool calls. Execute your defined functions and pass the results back to the model in a subsequent request if needed. This enables complex workflows without external orchestration layers.

Model Information

Use GET /v1/models to inspect available model IDs. Requests use uncensored. The route lists models; it does not establish compatibility with every OpenAI API feature.

The context window is 100,000 tokens. Pricing is transparent: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit never expires. There are no monthly fees or subscriptions.

Rate Limits and Errors

Limit your usage to 300 requests per minute per key. The maximum request body size is 8 MB. If you exceed the limit, you will receive a 429 error. Wait before retrying.

Common errors include 401 (invalid key) and 402 (insufficient credit). Top up from $20 by crypto (USDT on TRC20, USDC on Base). Add +5% bonus credit from $50, +10% from $100, and +15% from $200. Ensure your balance covers the estimated cost of your prompt and completion.

API facts in one table

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

FeatureSupport
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
AuthenticationAuthorization: Bearer YOUR_KEY
EndpointsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
Base URLhttps://api.unrestrictedaiapi.com/v1
Structured outputresponse_format: {"type": "json_object"}
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
SSE streamingSupported (stream: true), usage included at the end
Max context100,000 tokens (prompt + completion together)
Parallel requestsup to 8 in parallel per key
Request size8 MB request body
Requests per minute300/min per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Trial credit$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
Credit expirypaid credit never expires, no subscription
Bonus credit+5% from $50, +10% from $100, +15% from $200
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Billingprepaid credit, charged by real token usage; errors and refusals are free
Keysone key per account, regenerate any time (the old one stops working)
Sign-insign in with Google or with e-mail + password
Contentadult content allowed; sexual content involving minors is refused

When a request fails

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_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_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this API suitable for NSFW content?

Test the model with tasks allowed by the service’s content rules and review its replies. Requests can be refused or answered incorrectly. Sexual content involving minors is prohibited.

Do I need a credit card to start?

No. You can sign up with just an email and password. New users get $0.50 of trial credit valid for 7 days, one per person. Claim this credit with one click on your API key page. You only need a payment method when you want to top up your balance.

How do I handle errors in my application?

Monitor for standard HTTP status codes. Use 401 to check your key, 402 to add credit, and 429 to implement backoff logic for rate limits. Always validate the response body for detailed error messages.

Your key is one form away

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

Get API key