EN ▾

API Documentation: Uncensored Chat Completions

Start building uncensored media pipelines with this quickstart guide for our OpenAI-compatible chat-completions API. Generate refined prompts, captions, and metadata for your unrestricted image generation workflows in minutes.

Base URL and Authentication

The API is hosted at https://api.unrestrictedimagegenerator.cc/v1. It follows the OpenAI API structure, so you can use your existing SDKs by pointing them to this base URL. Authentication is handled via a Bearer token in the Authorization header. You obtain your key on the Get API key page using Google or an email address. The key is displayed immediately upon creation.

Our service is designed for developers who need reliable text generation without content refusals. The base URL works with any OpenAI-compatible client. Ensure your client library supports custom base URLs. This allows you to integrate our uncensored model into your existing image or video generation pipelines seamlessly.

First Request

Make your first API call to generate text. The endpoint POST /v1/chat/completions accepts your prompt and model ID. The model ID is uncensored. This model is an open-weight LLM tuned for lawful adult use, security research, and controversial topics without standard refusals. It is not GPT, Claude, or any other vendor's model.

Send a request with your API key. The response returns generated text, token usage, and completion details. This is the core of your prompt engineering workflow. Use this text as input for your image generation tools.

curl https://api.unrestrictedimagegenerator.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

Integrate the API into your Python scripts using the official OpenAI SDK. Set the base_url to our endpoint and provide your API key. The SDK handles JSON serialization and HTTP requests automatically. This is ideal for backend services or data processing scripts.

Define the system prompt to guide the model's behavior. For example, instruct it to describe visual elements for an unrestricted image generator. The SDK supports all standard parameters like temperature and top_p. This ensures predictable and controllable text output for your media pipelines.

from openai import OpenAI

client = OpenAI(base_url="https://api.unrestrictedimagegenerator.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 Integration

Use the Node.js SDK to integrate the API into your JavaScript or TypeScript applications. Configure the client with our base URL and your API key. The SDK mirrors the structure of the official OpenAI package, making migration easy. This is suitable for web servers or serverless functions.

Call the chat completions endpoint with your desired parameters. The response includes the generated text and usage statistics. You can parse this data to feed into other parts of your media generation workflow. The SDK handles retries and error states efficiently.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.unrestrictedimagegenerator.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

For real-time prompt generation, enable streaming by setting stream: true. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text and usage data. The final chunk includes the total token count.

Streaming is useful for user interfaces or live preview systems. It allows you to display text as it is generated. This improves the user experience in interactive media pipelines. The SDKs handle SSE parsing automatically, providing a simple asynchronous interface.

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 and Token Usage

The API enforces strict rate limits to ensure stability. You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. Errors and refusals do not consume credit, but token usage does.

Context window is 100,000 tokens total. There is no separate output cap. If you exceed limits, you receive a 429 error. Invalid keys return 401, and insufficient credit returns 402. Monitor your token usage to manage your prepaid credit effectively. Credit never expires, so you can use it at your own pace.

What the API supports

If your tool speaks the OpenAI API, these are the details that matter.

ItemValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.unrestrictedimagegenerator.cc/v1
API keyAuthorization: Bearer YOUR_KEY
Model IDuncensored
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
SSE streamingSupported (stream: true), usage included at the end
Max context100,000 tokens (prompt + completion together)
Structured outputresponse_format: {"type": "json_object"}
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max bodyup to 8 MB per request
Requests per minute300 requests per minute per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Parallel requestsup to 8 in parallel per key
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
Billingprepaid credit, charged by real token usage; errors and refusals are free
Credit expirypaid credit never expires, no subscription
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Bonus credit+5% from $50, +10% from $100, +15% from $200
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Key managementone active key per account; a new key replaces the old one
Content policyadult content allowed; sexual content involving minors is refused
Sign-inGoogle or e-mail and password

Error reference

The type field is stable, the message is for humans. Errors cost nothing.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

What is the context window and max output?

The total context window is 100,000 tokens, combining prompt and completion. There is no separate output cap per request. If you do not set max_tokens, the response can run to the end of the window.

How do I handle errors like 401 or 402?

A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. Errors and refusals are free, so you are not charged for failed requests. Check your account balance on the pricing page.

Is the uncensored model one of the major vendors?

No. The model ID is uncensored. It is an open-weight model run on our own servers, tuned for lawful adult use. It is not GPT, Claude, Gemini, Grok, DeepSeek, Qwen, or Llama.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key