Unrestricted AI Models: Quickstart: Integrate the Uncensored LLM
Integrate our uncensored llm into your application using the standard OpenAI-compatible API. This quickstart guides you from authentication to streaming responses with concrete code examples.
Authentication and Base URL
Connect to the unrestricted ai models API by setting the base URL to https://api.unrestrictedaimodels.cc/v1. Pass your API key in the Authorization header as a Bearer token. You receive this key immediately after signing up via Google or email on the Get API key page. The system uses one active key per account; generating a new key invalidates the previous one.
Basic Completion Request
Send a standard chat completion request to the /v1/chat/completions endpoint. Specify the model ID as uncensored. The API returns a text response based on your prompt. This endpoint does not support embeddings, image, or audio generation. Use the following curl command to verify connectivity:
curl https://api.unrestrictedaimodels.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 SDK Integration
Use the official OpenAI Python SDK to interact with the endpoint. Configure the client with your API key and the custom base URL. This approach is recommended for server-side applications where you need to manage context windows and parameters programmatically. The SDK handles serialization and retry logic automatically.
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedaimodels.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 SDK Setup
Integrate the API into Node.js applications by initializing the OpenAI client with the correct base URL. This allows you to build dynamic prompts and handle responses efficiently in JavaScript or TypeScript environments. The client supports the same parameters as the REST API, including temperature and stop sequences.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedaimodels.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 Responses
Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream of partial responses. This is ideal for real-time user interfaces. The final chunk of the stream contains the total token usage statistics. Streaming reduces perceived latency by delivering tokens as they are generated.
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
The context window is 100,000 tokens total, with no separate output cap. You are limited to 300 requests per minute and 8 concurrent requests per key. Common errors include 401 for invalid keys, 402 when prepaid credit is exhausted, and 429 for rate limits. Errors do not consume credit. The model refuses sexual content involving minors but allows other lawful adult content.
Under the hood: specs
Before you integrate, here is exactly what you get with a key.
| Spec | Value |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Base URL | https://api.unrestrictedaimodels.cc/v1 |
| API key | Bearer token in the Authorization header |
| Model ID | uncensored |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| SSE streaming | Supported (stream: true), usage included at the end |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Max context | 100,000 tokens (prompt + completion together) |
| JSON mode | JSON object mode via response_format json_object |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Requests per minute | 300 requests per minute per key |
| Request size | up to 8 MB per request |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | 8 requests at the same time per key |
| Credit expiry | paid credit never expires, no subscription |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Trial credit | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Token prices | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Key management | one active key per account; a new key replaces the old one |
| Content | adult content allowed; sexual content involving minors is refused |
| Account | sign in with Google or with e-mail + password |
When a request fails
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
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 | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
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 | temporary overload, retry shortly |
Questions and answers
What is the context window size?
The context window is 100,000 tokens, combining both the prompt and the completion. If you do not specify max_tokens, the response can run to the end of the window.
How does pricing work?
You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid by crypto (USDT or USDC) and never expires. Errors and refusals are free. There are no monthly subscriptions or base fees.
Can I use this with the official OpenAI SDKs?
Yes. The API is OpenAI-compatible. You only need to change the base_url and provide your API key. The model ID is uncensored. This works with any standard OpenAI-compatible client library.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.