Uncensored AIUncensored AI Image: Uncensored API Quickstart
Uncensored AI Image: Uncensored API Quickstart
Integrate our uncensored LLM into your media pipeline with a standard OpenAI-compatible interface. This quickstart covers authentication, basic requests, streaming, and function calling using the official SDKs.
Installation
Start by installing the official SDK for your language. We use the standard OpenAI-compatible protocol, so you can use the same libraries you already know. For Python, install the package via pip. For Node.js, use npm. These clients handle the HTTP transport and JSON serialization for you.
Once installed, configure your API key. You can generate a key on the Get API Key page. The key is valid immediately. No credit card is required for the initial trial credit.
Basic Completion
Send a simple text request to generate a completion. This is the core of our uncensored api. The model responds to prompts without the usual content filters for lawful adult or creative content. Use the base URL provided below.
The response contains the generated text in the choices[0].message.content field. This is ideal for generating scripts, captions, or metadata extraction from your image pipeline.
- Base URL:
https://api.uncensoredaiimage.com/v1 - Model ID:
uncensored
Here is a basic example using cURL:
curl https://api.uncensoredaiimage.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 SDK
Use the Python SDK for a clean, object-oriented approach. This is often the easiest way to integrate the uncensored llm into backend services or data processing scripts. The client handles retries and authentication headers automatically.
Set the base_url to point to our server. The model name is uncensored. You can adjust parameters like temperature to control creativity. This method is reliable for batch processing or generating structured text outputs.
Example implementation:
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaiimage.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 SDK
For JavaScript or TypeScript environments, the Node SDK provides similar ease of use. It is well-suited for serverless functions or API gateways that feed text into image generation workflows. The API behaves identically to the standard OpenAI interface.
Initialize the client with your API key and the correct base URL. You can then call chat.completions.create with your prompt. The response structure matches the standard OpenAI format, making it easy to swap in other models later if needed.
Code example:
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaiimage.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. This sends back chunks of text as they are generated. This is critical for real-time applications or when you want to display progress to users. Our streaming api supports SSE (Server-Sent Events).
Each chunk contains partial text. The final chunk includes the token usage statistics. This allows you to track costs in real-time. Streaming is efficient for long outputs like scripts or detailed captions.
Streaming example:
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)
Parameters & Limits
Our API has specific limits to ensure fair usage. You are allowed 300 requests per minute and 8 concurrent requests per key. The request body must be under 8 MB.
The context window is 100,000 tokens total (input + output). 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.
Common errors include 401 for invalid keys, 402 if your prepaid credit is exhausted, and 429 for rate limits. Refunds are not issued for credit, but errors do not consume tokens. We also enforce a hard limit on sexual content involving minors.
01Uncensored AI
Questions and answers
How do I top up my credit?
You can top up using USDT (TRC20) or USDC (Base). Payments range from $20 to $500. A bonus is added for larger amounts: +5% from $50, +10% from $100, and +15% from $200. Credit never expires.
Is this API compatible with OpenAI SDKs?
Yes. We use the OpenAI-compatible protocol. You can use the official OpenAI SDKs by simply changing the base URL to https://api.uncensoredaiimage.com/v1 and providing your API key.
What is the context window size?
The total context window is 100,000 tokens, including both the prompt and the completion. Output can run to the end of the window.
Uncensored AIuncensoredaiimage.com
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Specs at a glance
A quick checklist for developers: format, limits, features, billing.
| Parameter | Details |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| API key | Authorization: Bearer YOUR_KEY |
| Base URL | https://api.uncensoredaiimage.com/v1 |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Max context | 100,000 tokens (prompt + completion together) |
| JSON mode | JSON object mode via response_format json_object |
| Parallel requests | 8 requests at the same time per key |
| Rate limit | 300/min per key |
| Max body | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Payment | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Credit expiry | no monthly fee; paid credit does not expire |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Free trial | $0.50 of credit valid 7 days, no card needed · 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 |
| Account | Google or e-mail and password |
| 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 |
HTTP errors
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 | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
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 | temporary overload, retry shortly |