Base URL and Authentication
Start by setting your base_url to https://api.unrestrictedai.top/v1. We use standard OpenAI-compatible headers. Add your API key to the Authorization header as a Bearer token. You can generate a key via the "Get API key" page using Google or email. Each account holds one active key; issuing a new one revokes the previous. The trial credit is $0.50, valid for 7 days, requiring no card.
Your First Request
Send a POST request to /v1/chat/completions with the model ID "uncensored". The API returns text completions based on your prompt. Errors and refusals do not consume your prepaid credit. You can test connectivity immediately after signing up.
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 SDK Integration
Use the official openai Python package. Configure the client with the correct base URL and your API key. The model name is always "uncensored". This approach allows you to integrate the API into your Python scripts or backend services efficiently without extra wrappers.
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 SDK Integration
Initialize the OpenAI client in Node.js with the specific base URL. Set the model to "uncensored". This setup works with standard OpenAI-compatible clients, making it easy to add uncensored generation to your JavaScript or TypeScript applications.
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 Responses
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Token usage data appears only in the final chunk. This is ideal for real-time UI updates where you want to display text as it generates, reducing perceived latency for end-users.
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
Your context window is 64,000 tokens, with a max output of 16,000 tokens. Limits are 300 requests per minute and 8 concurrent requests per key. Error 401 means your key is invalid; 402 indicates insufficient credit; 429 signals a rate limit. Prompts are not used for training. Content involving minors is strictly blocked.