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.25
- Output tokens / 1M
- $1.00
- token context
- 64,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."}]
}'Your account receives $0.50 in trial credit valid for 7 days. You can regenerate your key at any time, which immediately revokes the old one. Each account is limited to one active key.
Chat Completions Endpoint
Send text to the POST /v1/chat/completions endpoint. The model identifier is uncensored. This is an open-weight model running on dedicated GPU servers, not a proxy for GPT or Claude. It answers without content refusals for lawful adult use.
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 64,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
Query GET /v1/models to verify available endpoints. Our primary model is uncensored. It is not GPT, Claude, Gemini, or any other vendor's model. It is tuned for consistent responses without hidden filters.
The context window is 64,000 tokens. Pricing is transparent: $0.25 per 1M input tokens and $1.00 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 $10 via card or crypto. Add +5% bonus credit from $50, and +10% from $100. Ensure your balance covers the estimated cost of your prompt and completion.
Questions and answers
Is this API suitable for NSFW content?
Yes, the model does not refuse lawful adult content. It is designed for uncensored responses. However, sexual content involving minors is always blocked regardless of the request context.
Do I need a credit card to start?
No. You can sign up with just an email and password. Every new account receives $0.50 of trial credit valid for 7 days. 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.