Unrestricted AI Models: Uncensored LLM API Quickstart
This guide shows you how to integrate our uncensored LLM API into your application in minutes. You will learn the required authentication, how to send requests, and how to handle streaming and tool calling.
Authentication and Base URL
Start by creating an account at unrestrictedaimodels.com. After signing up with your email and password, you receive an API key immediately. No credit card is required for the trial. Use this key in the Authorization header of every request. The base URL for all endpoints is https://api.unrestrictedaimodels.com/v1. This URL works with the official OpenAI SDKs and any standard OpenAI-compatible client. You only need to update the base URL and provide your key.
curl https://api.unrestrictedaimodels.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 API key is the only secret you need. If you lose it, you can regenerate it from your dashboard, which instantly invalidates the old key. There is no phone number requirement, keeping your setup simple and private. Prompts are not used for training, ensuring your data remains yours.
First Request with Python
To get started quickly, use the official OpenAI Python SDK. Install the package via pip install openai. Import the client and initialize it with your API key and the correct base URL. The model ID is uncensored. This is an open-weight model, not GPT or Claude, tuned to answer without content refusals for lawful adult use. Send a message and receive the full response text.
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedaimodels.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)
This approach gives you a raw uncensored ai model experience directly in your Python scripts. You can process the response as needed. The model does not apply the standard corporate guardrails, allowing for more creative or direct outputs. Remember that this is a text-only API, so you cannot request images or audio in the same call.
Node.js Integration
For JavaScript developers, the openai npm package works seamlessly. Initialize the client with your key and the hosted base URL. The uncensored model ID ensures you are talking to our specific uncensored LLM. You can pass standard parameters like temperature or max_tokens to control the output style. This is ideal for building uncensored coding llm assistants or content generators.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedaimodels.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);
The response object contains the generated text in response.choices[0].message.content. You can handle errors by catching exceptions from the SDK. This method is reliable for server-side rendering or API endpoints that need to serve unfiltered text to users. It avoids the latency of web interfaces by giving you direct access to the model’s output stream.
Streaming Responses
Set stream: true in your request to receive tokens as they are generated. This provides a smoother user experience, especially for longer responses. The API uses Server-Sent Events (SSE) to push data to your client. You can process each chunk as it arrives, updating the UI in real time. This is crucial for chat interfaces that need to feel responsive.
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 does not change the model or the cost. You still pay based on the total tokens used. The uncensored model supports streaming just like standard models. You can stop the stream early if the user changes their mind. This gives you full control over the generation process without waiting for the entire response to complete.
Tool Calling and Context
The API supports tool calling, allowing the model to invoke functions. Define your tools in the request, and the model will return structured JSON to call them. This is useful for building agents that can interact with other systems. The model understands function definitions and returns the correct arguments. This makes it a powerful open source ai models with no restrictions choice for complex tasks.
Each request supports a context window of 100,000 tokens, including both the prompt and the completion. You can pass multiple messages in the conversation history. The model maintains context across turns, allowing for coherent multi-turn dialogues. Keep your prompt within the limit to avoid truncation. This window size is sufficient for most document analysis and code generation tasks.
Limits, Errors, and Costs
Watch out for rate limits: 300 requests per minute per key. If you exceed this, you will receive a 429 error. Request bodies must be under 8 MB. Common errors include 401 for an invalid key and 402 if you run out of credit. You can top up from $10, with bonuses for larger amounts. Pricing is $0.25 per 1M input tokens and $1.00 per 1M output tokens. Credit never expires.
The only hard content limit is no sexual content involving minors, which is always blocked. All other lawful adult content is allowed. This uncensored llm online API is perfect for developers who need raw output without corporate filters. Use these limits to plan your scaling. Regenerate your key if you suspect a leak, as the old key stops working immediately.
Specs at a glance
Everything the endpoint can and cannot do, in one place — check it before you top up.
| Feature | Support |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Model | uncensored |
| API key | Authorization: Bearer YOUR_KEY |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.unrestrictedaimodels.com/v1 |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Max context | 100,000 tokens (prompt + completion together) |
| Completion length | up to 16,000 tokens per request (default 2,048) |
| Streaming | Supported (stream: true), usage included at the end |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Structured output | JSON object mode via response_format json_object |
| Parallel requests | 8 requests at the same time per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | up to 8 MB per request |
| Requests per minute | 300/min per key |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Price | input $0.25 / 1M tokens, output $1.00 / 1M tokens |
| Credit expiry | paid credit never expires, no subscription |
| Trial credit | $0.50 for 7 days, no card |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $10 to $500 |
| Volume bonus | +5% on $50+, +10% on $100+ |
| Key management | one active key per account; a new key replaces the old one |
| Account | sign in with Google or with e-mail + password |
| Content policy | adult content allowed; sexual content involving minors is refused |
Error reference
The type field is stable, the message is for humans. Errors cost nothing.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
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 | unknown endpoint |
413 | request_too_large | request body larger than 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 compatible with OpenAI SDKs?
Yes, it is fully compatible. You just need to update the base URL to our endpoint and provide your API key. The model ID is 'uncensored'.
Does the model remember previous messages?
Yes, it supports a 100,000 token context window. You can pass the entire conversation history in each request to maintain context.
What happens if I run out of credits?
You will receive a 402 error. You can top up your account from $10, with bonuses for larger amounts. Your credit never expires.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key