Unrestricted AI Model: Integration Quickstart
Integrate the unrestricted ai model into your application using our OpenAI-compatible API. This guide covers authentication, SDK examples for Python and Node.js, streaming, and handling rate limits.
Base URL & Authentication
Our API uses standard OpenAI endpoints. Set your base URL to https://api.unrestrictedaimodel.com/v1 and include your API key in the Authorization header as a Bearer token. The model identifier is uncensored. You can retrieve your key immediately after signing up via Google or email on the Get API key page.
- Base URL:
https://api.unrestrictedaimodel.com/v1 - Model ID:
uncensored - Auth Header:
Authorization: Bearer YOUR_API_KEY
First Request
Send a basic chat completion request to verify connectivity. This endpoint accepts text input and returns text output. Ensure you have sufficient prepaid credit; requests without credit will fail with a 402 error. The uncensored llm will process your prompt without content refusals for lawful adult use.
- Max input context: 100,000 tokens
- Max output: up to the end of the 100,000-token window
- Request body limit: 8 MB
Test your integration with this curl command:
curl https://api.unrestrictedaimodel.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."}]
}'
Python Integration Example
Use the official openai Python SDK for seamless integration. Configure the base_url and api_key to point to our infrastructure. This approach works for any Python application requiring an uncensored llm without local hardware. The SDK handles JSON serialization and error parsing automatically.
Install the SDK via pip, then initialize the client with your credentials. The example below demonstrates a standard chat completion call.
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedaimodel.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)
Node.js Integration Example
For JavaScript or TypeScript projects, use the openai npm package. Set the basePath to our API endpoint and provide your API key. This ensures compatibility with existing OpenAI-compatible clients in the Node ecosystem. You can pass parameters like temperature or top_p to control generation behavior.
Ensure your Node.js environment supports the required fetch polyfill if you are using an older version. The example below shows how to initialize the client and send a request.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedaimodel.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);
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) containing partial completions. This is ideal for real-time user interfaces. The final chunk includes the total token usage for billing purposes. Errors during streaming are reported in the final chunk.
Handle the stream asynchronously to avoid blocking your application thread. The example below demonstrates reading the stream in chunks.
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)
Rate Limits & Constraints
Monitor your usage to avoid interruptions. The API enforces strict limits per API key: 300 requests per minute and 8 concurrent requests. If you exceed these, you will receive a 429 Too Many Requests error. Authentication failures return a 401 error, and insufficient credit returns a 402 error. Each account holds one active key; generating a new key replaces the old one. Context windows are shared between prompt and completion, up to 100,000 tokens total.
Under the hood: specs
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Feature | Support |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Authentication | Authorization: Bearer YOUR_KEY |
| Model ID | uncensored |
| Base URL | https://api.unrestrictedaimodel.com/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Streaming | Supported (stream: true), usage included at the end |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Context window | 100,000 tokens, input and output combined |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Structured output | JSON object mode via response_format json_object |
| Requests per minute | 300/min per key |
| Parallel requests | 8 requests at the same time per key |
| Max body | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| 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 |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Token prices | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Subscription | paid credit never expires, no subscription |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| 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 |
HTTP errors
Every error is JSON with a type you can switch on. You are never charged for an error.
| 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 | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
How is billing calculated?
Billing is based on real token usage for input and output. The rate is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals do not consume credit.
What payment methods are accepted?
We accept top-ups by crypto (USDT on TRC20, USDC on Base). You can top up with any whole amount from $20 to $500. No card is needed to sign up or for the trial.
Is there a free trial available?
Yes, new users get $0.50 of trial credit valid for 7 days, one per person. Claim this credit with one click on your API key page. No card is needed to start.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.