Unrestricted AI API Documentation
Get started with our uncensored LLM API in minutes using standard OpenAI-compatible clients. This guide covers authentication, endpoints, streaming, and parameters for the 'uncensored' model.
Authentication & Keys
Start by generating an API key via the dashboard using Google or email. Your key authenticates requests to the base URL HTTPS://api.iaunrestricted.com/v1. Include it in the Authorization header as a bearer token. Each account supports one active key; replacing it invalidates the old one immediately.
curl https://api.iaunrestricted.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Return the current UTC time in ISO 8601 format"}]
}'Errors like 401 mean your key is invalid or expired. Keep your key secure since it is tied directly to your prepaid credit balance.
The Chat Completions Endpoint
Send text to the model via POST /v1/chat/completions. The endpoint accepts standard message arrays and returns generated text. Use the model identifier "uncensored" in your requests. The system processes input and output tokens based on your prepaid balance.
from openai import OpenAI
client = OpenAI(base_url="https://api.iaunrestricted.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)The context window allows 100,000 tokens total. If you omit max_tokens, the output caps at 2,048 tokens. Requests exceeding the 8 MB body limit return an error.
Streaming Responses
Enable streaming by setting stream: true in your request. This delivers tokens via Server-Sent Events (SSE) for lower latency. The final chunk contains the total token usage for billing accuracy.
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)Streaming works with any OpenAI-compatible SDK. You can parse partial responses in real-time without waiting for the full completion. This is ideal for chat interfaces where users see text as it generates.
JSON Mode & Function Calling
Force structured output using response_format: {"type": "json_object"}. The model returns valid JSON instead of natural language. This is useful for parsing data or controlling model behavior strictly.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.iaunrestricted.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);Function calling (tools) is supported. Define your tool schemas and let the model decide when to invoke them. Use tool_choice to enforce specific behaviors. This feature works seamlessly with the uncensored model for structured data extraction.
Parameters: Temperature, Top P, and More
Control generation randomness with temperature and top_p. Adjust presence_penalty and frequency_penalty to reduce repetition. Set seed for reproducible outputs. Use stop sequences to halt generation early.
These parameters work exactly like the OpenAI API. You can fine-tune the model's creativity or determinism. Default values are optimized for balanced output. Experiment with lower temperatures for consistent results.
Limits, Errors, and Context
Rate limits are 300 requests per minute and 8 concurrent requests per key. Your context window is 100,000 tokens. Errors include 402 for insufficient credit and 429 for rate limits. Prepaid credit never expires.
Requests are charged by actual token usage. Errors and refusals are free. The model refuses sexual content involving minors regardless of other parameters. Keep an eye on your dashboard for usage stats.
Frequently asked questions
How do I debug missing citations in parallel chat API responses?
Ensure you are using the correct model ID "uncensored" in your requests. Check that your message arrays follow the standard OpenAI format. Verify that your SDK version supports the features you are using.
Is this the same as other unrestricted AI models?
No, we run our own open-weight model tuned for uncensored output. It is not GPT, Claude, or any other vendor's model. The behavior is specific to our infrastructure and tuning.
What happens if I exceed my prepaid credit?
Requests will return a 402 error until you top up. You can add credit via crypto at any time. Your existing credit does not expire, so you can add more later.
Get your API key instantly
Register, copy the key, update the base URL. Done.