EN ▾
Get API key
uncensoredimage.cc

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.

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
API keyAuthorization: Bearer YOUR_KEY
Base URLhttps://api.uncensoredimage.cc/v1
StreamingYes — server-sent events; the last chunk carries token usage
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Context window100,000 tokens, input and output combined
Structured outputJSON object mode via response_format json_object
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Rate limit300 requests per minute per key
Parallel requestsup to 8 in parallel per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Paymentcrypto: 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 paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Credit expiryno monthly fee; paid credit does not expire
Key managementone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused
Accountsign 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.

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_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 · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary 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.