EN ▾
Get API key

Uncensored API Quickstart Guide

This quickstart guide walks you through integrating the uncensored llm api into your text pipeline using standard OpenAI-compatible clients. You will learn how to authenticate, send requests, handle streaming, and manage billing for this uncensored chat completions service.

01

Base URL and Authentication

To start using the uncensored llm api, you need an API key from the Get API key page. You can sign in with Google or use an email and password. The key is displayed immediately and is tied to one account; generating a new key replaces the old one. There is no phone number requirement for signup.

All requests must target the base URL https://api.unfilteredaigenerator.cc/v1. This endpoint is compatible with standard OpenAI SDKs. You must include your API key in the Authorization header as a Bearer token. This configuration allows you to use the same client code you might already have for other providers, just by changing the base URL and key.

First Request

Send a standard POST /v1/chat/completions request to generate text. The model identifier is uncensored. This is an open-weight model tuned to answer without content refusals for lawful adult use, excluding sexual content involving minors. You can set parameters like temperature and top_p to control creativity.

  • Input tokens are charged at $0.15 per 1M.
  • Output tokens are charged at $0.50 per 1M.
  • Errors and refusals are free.

Here is a basic curl example:

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

Using the official OpenAI Python SDK is the most common way to integrate this openai compatible uncensored API. You must configure the client to point to our base URL. This allows you to use familiar methods like chat.completions.create().

The API supports streaming responses via Server-Sent Events (SSE). When streaming, token usage is reported in the final chunk. You can also use response_format to enforce JSON mode or tools for function calling. The model handles these features natively.

from openai import OpenAI

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

For JavaScript or TypeScript projects, the OpenAI Node SDK works seamlessly after configuration. Set the apiKey and baseURL properties in your client initialization. This ensures all requests route to our infrastructure.

You can handle responses asynchronously. The API returns standard JSON objects. If you need structured data, enable JSON mode by setting response_format to {"type": "json_object"}. This is useful for extracting data or generating configuration files. Note that this is a text-only API; it does not generate images or audio.

import OpenAI from "openai";

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

Streaming is supported via Server-Sent Events (SSE). This is ideal for real-time text generation in your application. The API sends chunks of text as they are generated. Token usage details, including input and output counts, are included in the final chunk of the stream.

Implement your client to read these chunks. If an error occurs, the stream will close with an error event. You can catch these errors to handle billing or retry logic. Streaming does not affect pricing; you still pay per token 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)

Limits, Errors, and Context

Understand the uncensored api key limits to avoid service interruptions. You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. The context window is 100,000 tokens total, with no separate output cap per request (if max_tokens is unset, the response can run to the end of the window).

Common errors include:

  • 401 Unauthorized: Invalid or missing API key.
  • 402 Payment Required: Insufficient prepaid credit.
  • 429 Too Many Requests: Rate limit exceeded.

Credit never expires, so you can top up when convenient.

02

Questions and answers

Does the uncensored model block all sexual content?

No, it does not refuse most lawful adult, fictional, or controversial topics. However, it enforces a hard content limit: requests containing sexual content involving minors are always refused.

How is billing handled for errors?

You are only charged for successful token generation. If a request fails due to a rate limit, invalid input, or network error, no tokens are consumed, and you are not charged.

Can I use this API for image generation?

No, this is a text-only chat-completions API. It does not support image, audio, or video generation. It is designed for text pipelines like prompt writing, extraction, and post-processing.

Your key is one form away

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

Get API key

What the API supports

If your tool speaks the OpenAI API, these are the details that matter.

SpecValue
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
API keyBearer token in the Authorization header
Base URLhttps://api.unfilteredaigenerator.cc/v1
MethodsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
StreamingSupported (stream: true), usage included at the end
JSON moderesponse_format: {"type": "json_object"}
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Context window100,000 tokens, input and output combined
Parallel requests8 requests at the same time per key
Request size8 MB request body
Requests per minute300 requests per minute per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
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
Credit expiryno monthly fee; paid credit does not expire
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Bonus credit+5% from $50, +10% from $100, +15% from $200
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Sign-inGoogle or e-mail and password
Key managementone key per account, regenerate any time (the old one stops working)

HTTP errors

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

HTTPTypeWhat to do
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_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly