EN ▾
Get API key
per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Quickstart: Integrate the Uncensored Chat API

Get started with the uncensored chat API in minutes. This guide covers authentication, sending requests, and handling streaming responses for your NSFW AI pipeline.

Authentication & Base URL

Our API follows the standard OpenAI format, making integration straightforward. Use the base URL https://api.uncensoredimagegenerator.top/v1 for all requests. Authentication relies on a single API key per account, which you receive immediately after signing up via Google or email on the Get API key page. Pass this key in the Authorization header as a Bearer token. If the key is invalid or expired, the API returns a 401 error. Ensure you are using the correct base URL to avoid connectivity issues.

Sending a Chat Request

Send a standard chat.completions request to generate text. The model ID is uncensored, an open-weight model tuned for lawful adult content without refusals. You can set parameters like temperature and top_p to control creativity. The context window supports up to 100,000 tokens total, with no separate output cap. If you do not specify max_tokens, the response can run to the end of the window. Errors and refusals do not consume credit.

curl https://api.uncensoredimagegenerator.top/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 SDK or any compatible client. Set the base URL and API key in your client configuration. This approach simplifies request handling and response parsing. The model responds with text only, suitable for prompt drafting, captioning, or post-processing in your image generation stack. Remember that prepaid credit is charged by real token usage, so monitor your consumption via the account settings.

from openai import OpenAI

client = OpenAI(base_url="https://api.uncensoredimagegenerator.top/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

For JavaScript developers, the OpenAI Node.js SDK works seamlessly. Configure the client with your base URL and API key. This allows you to integrate uncensored text generation directly into your Node-based pipelines. Whether you are building a script for Stable Diffusion or a custom web app, the SDK handles the HTTP requests efficiently. Ensure your code handles the response data correctly to extract the generated text.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.uncensoredimagegenerator.top/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 in your request. The API returns a Server-Sent Events (SSE) stream, delivering tokens in real-time. Token usage is reported in the final chunk of the stream, ensuring accurate billing. This feature is ideal for applications that benefit from immediate text output. Streaming does not affect the pricing model; you are charged only for the actual tokens generated.

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 & Usage

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 returns a 429 error. Ensure you have sufficient credit before sending large batches; insufficient funds will result in a 402 error. You can top up your account with crypto (USDT on TRC20 or USDC on Base) via the account page. Errors and refusals are free, so you are not charged for failed requests.

Technical specifications

One table with every limit, feature and price that applies to your key.

ParameterDetails
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.uncensoredimagegenerator.top/v1
API keyBearer token in the Authorization header
Model IDuncensored
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
SSE streamingYes — server-sent events; the last chunk carries token usage
Max context100,000 tokens, input and output combined
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
JSON moderesponse_format: {"type": "json_object"}
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Concurrencyup to 8 in parallel per key
Max body8 MB request body
Requests per minute300/min per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Billingprepaid credit, charged by real token usage; errors and refusals are free
Trial credit$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
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Subscriptionpaid credit never expires, no subscription
Volume bonus+5% from $50, +10% from $100, +15% from $200
Accountsign in with Google or with e-mail + password
Content policyadult content allowed; sexual content involving minors is refused
Key managementone active key per account; a new key replaces the old one

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

What happens if I run out of credit?

Requests will fail with a 402 error. You can top up your account with USDT or USDC at any time. Credit never expires, so you can add funds whenever convenient.

Does the API refuse adult content?

No, the model is tuned to answer without content refusals for lawful adult content. The only hard limit is sexual content involving minors, which is always blocked.

How do I get a new API key?

Sign up on the Get API key page using Google or email. You can generate a new key, which will replace your old active key. Your previous key will remain valid until you generate a new one.

Your key is one form away

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