Uncensored Image API Documentation
Use this uncensored image API documentation to integrate our text-completions engine into your NSFW image generation pipelines. Get started with our OpenAI-compatible endpoint, handle streaming responses, and manage token usage with transparent prepaid billing.
Authentication & Base URL
Our API uses standard Bearer token authentication. To interact with the uncensored image text engine, set your Authorization header to Bearer YOUR_API_KEY. You can retrieve your key immediately after signing up via Google or email on the Get API key page. There is no phone number requirement, and your key is shown once upon creation. Use the base URL https://api.uncensoredimage.cc/v1 for all requests. This base URL works with official OpenAI SDKs and any OpenAI-compatible client by simply updating the base_url configuration.
First Request
Send a POST request to /v1/chat/completions to generate text. The API serves a single uncensored large language model identified by the model ID uncensored. This model is tuned to answer without content refusals for lawful adult use. It is not GPT, Claude, or any other vendor's model. Send your system and user messages in the standard messages array. The API returns text completions that you can use for prompt generation, script writing, or post-processing extraction.
curl https://api.uncensoredimage.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."}]
}'
The request body includes model, messages, and optional parameters like temperature and top_p. Errors and refusals are free, meaning they do not consume your prepaid credit. Ensure your requests stay within the 8 MB body limit and the 100,000 token context window.
Python SDK Integration
Use the official OpenAI Python SDK to integrate seamlessly. Initialize the client with your API key and the custom base URL. The model ID uncensored must be specified in every request. This approach ensures compatibility with existing image pipeline code that expects standard chat completions. You can stream responses or request JSON mode depending on your needs. The SDK handles serialization automatically, reducing boilerplate code in your NSFW image generation tools.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredimage.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)
Remember that the API does not support embeddings, fine-tuning, or other endpoints. Only /v1/chat/completions and /v1/models are available. This focused design reduces complexity and cost for developers building dedicated text engines for image pipelines.
Node SDK Integration
For JavaScript environments, use the OpenAI Node SDK. Configure the base URL and API key just as you would for any other OpenAI-compatible service. Set the model to uncensored to ensure you are using our dedicated uncensored text model. This is ideal for server-side prompt generation or client-side text processing in web-based image tools. The SDK supports both synchronous and asynchronous requests, fitting into various architecture patterns.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredimage.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);
Since we do not offer model routing or multiple model options, the Node SDK configuration remains simple. You do not need to handle complex routing logic. Just point to our base URL and send standard chat messages. This consistency makes debugging easier when integrating with image generation APIs like Stable Diffusion or Flux.
Streaming & JSON Mode
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) with token usage details in the final chunk. This allows real-time display of generated prompts or captions in your UI. Alternatively, use JSON mode by setting response_format: {"type": "json_object"}. This ensures the output is valid JSON, which is useful for structured data extraction or programmatic processing. Both modes work with the same underlying uncensored model.
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)
Streaming does not change the pricing or token limits. You still pay per 1M input and output tokens. Errors during streaming are free, so you are not charged for incomplete responses due to network issues. Use streaming for better user experience in interactive image generation workflows.
Rate Limits, Errors & Context
Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, the API will reject the request. The context window is 100,000 tokens total, including prompt and completion. There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window. Credit is charged by real token usage; errors and refusals are free. This transparent billing model ensures you only pay for actual content generated by the uncensored text engine.
Specs at a glance
A quick checklist for developers: format, limits, features, billing.
| Parameter | Details |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Model | uncensored |
| API key | Authorization: Bearer YOUR_KEY |
| Base URL | https://api.uncensoredimage.cc/v1 |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Context window | 100,000 tokens, input and output combined |
| Structured output | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Rate limit | 300 requests per minute per key |
| Parallel requests | up to 8 in parallel per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Request size | 8 MB request body |
| Token prices | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| 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 |
| Volume bonus | +5% on $50+, +10% on $100+, +15% on $200+ |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Credit expiry | no monthly fee; paid credit does not expire |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content | adult content allowed; sexual content involving minors is refused |
| Account | sign in with Google or with e-mail + password |
When a request fails
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 | 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 | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
Is the uncensored image API the same as GPT or Claude?
No, it is an open-weight model run on our own servers, tuned specifically for uncensored responses. It is not GPT, Claude, Gemini, or any other vendor's model.
Do errors consume my prepaid credit?
No, errors and refusals are free. You are only charged for actual token usage in successful responses. This applies to both standard and streaming requests.
How do I get my API key?
Sign up on the Get API key page using Google or email and password. Your key is shown immediately after registration. No phone number is required.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.