Unrestricted AI API Quickstart Guide
Integrate the Unrestricted AI API with a single base URL and standard OpenAI-compatible SDKs. Get raw, uncensored model outputs without content refusals or model routing overhead.
- base_url
- https://api.unrestrictedai.cc/v1
- model
- uncensored
Authentication and Base URL
The Unrestricted AI API uses standard bearer token authentication. You obtain your API key immediately after signing up with Google or an email address on the Get API key page. No phone number is required. Use the base URL https://api.unrestrictedai.cc/v1 for all requests. This URL works with the official OpenAI SDKs and any OpenAI-compatible client by simply updating the base_url configuration. Your key grants access to the uncensored model identified by the ID uncensored. This is a single, open-weight model running on our own servers, not GPT, Claude, or any other vendor's model. We do not perform model routing, ensuring low-latency access to a model tuned for adult and unfiltered content without the bloat of a web chat UI. The API key is unique per account; generating a new key replaces the previous one.
Basic Chat Request
Send a POST request to /v1/chat/completions with your messages and the model ID. The following example demonstrates a standard text-in, text-out interaction using the cURL command-line tool. Replace YOUR_API_KEY with your actual key. The model ID must be set to uncensored. This endpoint returns the model's response as JSON. Ensure you handle the response body to extract the assistant's message content. This basic request is the foundation for building applications that require raw, unfiltered LLM responses without content refusals or model routing overhead.
Python SDK Integration
Using the official Python SDK simplifies integration with the uncensored api. Configure the client with the correct base URL and your API key. The code below shows how to instantiate the client and send a request to the uncensored llm api. This approach is ideal for backend services or scripts where you need programmatic control over the request parameters. The SDK handles JSON serialization and HTTP connections automatically. Remember that the model ID remains uncensored. This method is efficient for developers who prefer typed interfaces and robust error handling in their Python applications.
Node.js SDK Usage
For JavaScript and TypeScript environments, the Node SDK provides a native way to interact with the API. Set the baseURL to our endpoint and provide your API key. The following snippet demonstrates a simple completion request. This pattern is suitable for server-side rendering or API gateways. The response structure matches the OpenAI format, making it easy to migrate existing OpenAI code. Ensure you handle asynchronous responses correctly. The uncensored ai api key allows you to switch from OpenAI to our service with minimal code changes, preserving your existing application logic while gaining access to unfiltered 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 useful for real-time user interfaces where you want to display tokens as they are generated. The final chunk of the stream contains the token usage statistics. Streaming allows you to start displaying content to the user before the full response is ready, improving perceived latency. Ensure your client correctly parses the SSE format. This feature is available for all requests to the uncensored ai api, allowing you to build responsive applications that handle raw, unfiltered LLM responses without content refusals or model routing overhead.
Parameters, Limits, and Errors
The context window is 100,000 tokens total, with no separate output cap. If max_tokens is not set, the response can run to the end of the window. You can use parameters like temperature, top_p, stop, and seed to control generation. Rate limits are 300 requests per minute and 8 concurrent requests per key. Request bodies must be under 8 MB. Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). Credit is prepaid and never expires. Errors and refusals are free. The only hard content limit is sexual content involving minors, which is always refused. No card is needed for the $0.50 trial valid for 7 days. Claim this credit with one click on your API key page.
cURL
curl https://api.unrestrictedai.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
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedai.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
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedai.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
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)What the API supports
Before you integrate, here is exactly what you get with a key.
| Parameter | Details |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| API key | Authorization: Bearer YOUR_KEY |
| Base URL | https://api.unrestrictedai.cc/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model | uncensored |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| JSON mode | response_format: {"type": "json_object"} |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Context window | 100,000 tokens (prompt + completion together) |
| Parallel requests | 8 requests at the same time per key |
| Max body | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300 requests per minute per key |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| How you pay | pay 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 |
| 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 expiry | paid credit never expires, no subscription |
| Account | sign in with Google or with e-mail + password |
| Key management | one active key per account; a new key replaces the old one |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
Error codes
Every error is JSON with a type you can switch on. You are never charged for an error.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
Is this API an official OpenAI service?
No. We offer a single, uncensored open-weight model via a standard OpenAI-compatible interface. It is not GPT, Claude, Gemini, or any other vendor's model. It is an independent service running on our own servers.
How do I top up my credit?
Credit is topped up by crypto (USDT on TRC20, USDC on Base). Minimum top-up is $20, maximum is $500. You receive a +5% bonus for top-ups of $50, +10% for $100, and +15% for $200.
What is the context window size?
The context window is 100,000 tokens for prompt and completion combined. There is no separate output cap, and if max_tokens is not specified, the response can run to the end of the window.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.