EN ▾
Get API key

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.

FeatureSupport
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
AuthenticationAuthorization: Bearer YOUR_KEY
Model IDuncensored
Base URLhttps://api.unrestrictedaimodel.com/v1
MethodsPOST /v1/chat/completions · GET /v1/models
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
StreamingSupported (stream: true), usage included at the end
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Context window100,000 tokens, input and output combined
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Structured outputJSON object mode via response_format json_object
Requests per minute300/min per key
Parallel requests8 requests at the same time per key
Max body8 MB request body
HeadersX-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-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% from $50, +10% from $100, +15% from $200
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Subscriptionpaid credit never expires, no subscription
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Key managementone active key per account; a new key replaces the old one
Accountsign in with Google or with e-mail + password
Content policyadult 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.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary 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.

Get API key