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.
| Item | Value |
|---|---|
| Compatibility | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.unrestrictedimagegenerator.cc/v1 |
| API key | Authorization: Bearer YOUR_KEY |
| Model ID | uncensored |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| SSE streaming | Supported (stream: true), usage included at the end |
| Max context | 100,000 tokens (prompt + completion together) |
| Structured output | response_format: {"type": "json_object"} |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Max body | up to 8 MB per request |
| Requests per minute | 300 requests per minute per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | up 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 |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Credit expiry | paid credit never expires, no subscription |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Key management | one active key per account; a new key replaces the old one |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Sign-in | Google or e-mail and password |
Error reference
The type field is stable, the message is for humans. Errors cost nothing.
| Status | Type | Reason |
|---|---|---|
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 | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
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
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.