EN ▾
Claim trial key

Uncensored API Documentation

Get an uncensored LLM endpoint working in minutes. This guide covers the OpenAI-compatible chat completions API, streaming, and error handling for direct integration.

Authentication and Base URL

Your API key authenticates every request. Use the base URL HTTPS://api.uncensores.cc/v1 with any standard OpenAI SDK. The model identifier is "uncensored". Pass your key in the Authorization header as a Bearer token. You can generate a key via the dashboard using Google or email. Each account holds one active key that replaces the previous one.

curl https://api.uncensores.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list the top ten python libraries for data science"}]
  }'

You must include the model field in every request. The endpoint expects a messages array containing your conversation history. If the key is missing or invalid, the API returns a 401 error. This ensures only authorized users consume your prepaid credit.

The Chat Completions Endpoint

Send POST requests to /v1/chat/completions for text generation. This endpoint handles standard conversational prompts and returns structured text responses. It does not support embeddings or image generation. You provide system, user, and assistant messages to guide the model. The model responds with raw text content inside the choices array.

from openai import OpenAI

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

Initialize the client with your base URL and key. Define the messages list with your desired role and content. Execute the chat.completions.create method. The response object contains the generated text and usage statistics. This direct approach eliminates routing complexity for NSFW or creative writing tasks.

Streaming Responses with SSE

Enable streaming by setting stream to true in your request. The API returns Server-Sent Events (SSE) as tokens become available. This reduces perceived latency for long outputs. Each chunk contains a partial delta of the response. You must accumulate these deltas to reconstruct the final text.

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)

The final chunk includes the complete usage statistics for the request. This allows you to track token consumption in real-time. Streaming is ideal for chat interfaces where users expect immediate feedback. It works seamlessly with the uncensored model's output format.

Function Calling and JSON Mode

The API supports function calling via the tools parameter. Define your function schema in the request and set tool_choice to auto or a specific name. The model returns function calls in the response instead of plain text. You can also enforce JSON output by setting response_format to json_object. This ensures predictable parsing for automated workflows.

import OpenAI from "openai";

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

Pass the tool definitions in the tools array. The model will select the appropriate function based on the input. You receive the function name and arguments in the response. This feature works alongside the standard chat completions without extra endpoints. Use it for structured data extraction or agent-like behavior.

Parameters: Temperature, Top-P, and Seeds

Adjust temperature to control randomness. Values above 1 increase creativity, while values below 1 make outputs more deterministic. Use top_p to limit sampling to the top percentage of probability mass. Set seed for reproducible results across identical requests. These parameters allow fine-tuning of the uncensored model's output style.

You can also use stop sequences to halt generation at specific strings. presence_penalty and frequency_penalty help reduce repetition. The default temperature is 1.0. Adjusting these settings helps optimize for roleplay or technical writing. Each request supports these standard OpenAI-compatible parameters.

Token Limits and Context Window

The context window supports 100,000 tokens total for prompt and completion. You can output up to 16,000 tokens per request. If you omit max_tokens, the default is 2,048 tokens. This limit applies to the combined input and output. Requests exceeding the body size of 8 MB will fail. The API enforces a rate limit of 300 requests per minute. Concurrent requests are capped at 8 per key. Errors like 402 (no credit) or 429 (rate limit) provide clear feedback. Unused credit never expires, ensuring you pay only for actual usage.

FAQ

Is Uncensores an official OpenAI service?

No, it is an independent service providing an uncensored large language model. It uses the OpenAI-compatible API format for easy integration. The model is not GPT, but a separate open-weight model tuned for zero refusals. You can use official OpenAI SDKs by changing the base URL and API key.

Which payment methods do you accept?

Crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500. Bonus credit applies from $50.

What content is uncensored?

The model does not refuse lawful adult, fictional, or controversial topics. It allows swearing and mature themes without standard filters. The only hard limit is sexual content involving minors, which is always refused. This makes it suitable for NSFW chatbots and raw creative writing.

Get your API key

Register, copy your key, update the base URL. Done.

Claim trial key