EN ▾
Get API key

Uncensored Image Generator Text API Documentation

This guide shows how to integrate the uncensored text engine into your image generation pipeline for prompt engineering, captioning, and metadata extraction.

Base URL & Authentication

Every request to the unfiltered image generator API requires a valid API key passed in the Authorization header. The base URL is fixed at https://api.unfilteredimagegenerator.cc/v1. This URL works with the official OpenAI SDKs and any OpenAI-compatible client by updating the base_url configuration. Your key is generated immediately after signing up with Google or email on the key page. There is no phone number verification required, and the key is shown once. Keep it secure, as it grants access to your prepaid credit. If you lose it, generate a new key from the dashboard; the old key stops working immediately. This setup ensures your text pipeline remains reliable without unexpected content refusals during prompt generation.

First Request

Send a standard chat.completions request to generate text. Use the model ID uncensored to access the open-weight model tuned for lawful adult and controversial topics. The API accepts standard parameters like temperature, top_p, and stop. Responses are returned in JSON format. Errors are handled via standard HTTP status codes. This endpoint is the core of your text pipeline, allowing you to extract captions or write scripts for your images. Remember, this is a text-only API; it does not generate images, audio, or video itself.

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

Use the official openai Python package to interact with the API. Initialize the client with your API key and the specific base URL. The uncensored model ID ensures you get the expected uncensored responses. You can stream responses or retrieve them as standard objects. This approach is ideal for backend services that process large batches of image metadata. The library handles JSON parsing and error retries automatically. Ensure your environment has the openai package installed. This method is robust for production environments where reliability is critical.

from openai import OpenAI

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

The Node.js SDK follows the same pattern. Install the openai package and configure the client with your key and base URL. Use the uncensored model ID for requests. This is useful for serverless functions or web servers that need to generate prompts on the fly. The SDK supports both synchronous and asynchronous calls. You can pass custom headers if needed, though the standard configuration is sufficient for most use cases. Errors are thrown as standard JavaScript errors, which you can catch and handle appropriately. This integration is straightforward and fits well into existing JavaScript pipelines.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) as tokens are generated. This reduces perceived latency for long text outputs. The final chunk contains the total token usage for billing. Streaming is ideal for real-time captioning or interactive prompt editing. It allows you to display partial results to users immediately. Ensure your client handles SSE correctly. The uncensored model supports streaming efficiently. This feature is critical for applications where speed matters, such as live image analysis pipelines.

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 & Error Handling

Each API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. If you exceed these limits, the API returns a 429 status code. Authentication errors return 401, indicating an invalid or missing key. Payment errors return 402, meaning you need to top up your credit. The context window is 100,000 tokens total, with no separate output cap. If you do not set max_tokens, the response can run to the end of the window. Errors and refusals are free, so you only pay for successful token generation. Monitor your usage via the dashboard to avoid service interruptions.

API facts in one table

The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.

ItemValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
Model IDuncensored
API keyBearer token in the Authorization header
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.unfilteredimagegenerator.cc/v1
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
JSON moderesponse_format: {"type": "json_object"}
Max context100,000 tokens, input and output combined
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
StreamingSupported (stream: true), usage included at the end
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Concurrencyup to 8 in parallel per key
Request size8 MB request body
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
Subscriptionno monthly fee; paid credit does not expire
Billingprepaid credit, charged by real token usage; errors and refusals are free
Volume bonus+5% from $50, +10% from $100, +15% from $200
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Keysone active key per account; a new key replaces the old one
Sign-insign in with Google or with e-mail + password
Contentadult content allowed; sexual content involving minors is refused

HTTP errors

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundunknown endpoint
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 model the same as GPT-4?

No, 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. It answers without content refusals for specific use cases.

How do I pay for the API?

You can top up with USDT (TRC20) or USDC (Base). Any whole amount from $20 to $500 is accepted. You can also start with a free $0.50 trial credit for new accounts. Claim this credit with one click on your API key page. Credit never expires.

What happens if I send a request with sexual content involving minors?

This is a hard content limit that always applies. Requests containing sexual content involving minors will be refused, even though the model is uncensored for other lawful adult content.

Your key is one form away

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

Start with trial credit

Email and password, key on screen right away.