uk ▾
UncensorLLMClaim trial key

API Documentation

Start using our uncensored AI API in minutes with standard OpenAI-compatible endpoints. Get your key, set your base URL, and send requests without content refusals.

Base URL and authentication

The uncensored llm API uses standard OpenAI-compatible headers. Send your Authorization header with the Bearer scheme and your unique API key. This key is generated immediately after signup via Google or email. Use the base URL https://api.uncensorllm.com/v1 for all requests. Your key grants access to the uncensored model without subscription fees.

Make your first request

Send a POST request to /v1/chat/completions with your desired model and prompt. The model ID is uncensored. The system processes text input and returns text output. Errors do not consume credit. Refusals for lawful adult content are rare. Use this cURL command to test connectivity.

curl https://api.uncensorllm.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Calculate the area of a circle with radius 5"}]
  }'

This call verifies your authentication and returns the first tokens from the model. Check the response status code to confirm success.

Python SDK integration

Use the official OpenAI Python library to interact with our API. Set the base_url to our endpoint and provide your API key. The client handles streaming and parsing automatically. This approach works for most standard applications requiring unfiltered responses.

from openai import OpenAI

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

Import the necessary modules and initialize the client. Pass your prompt as a list of messages. The response object contains the generated text in the choices array.

Node.js client setup

Integrate the API into your Node.js projects using the standard SDK. Configure the base URL to point to our servers. This ensures compatibility with existing codebases designed for OpenAI. You can switch providers by changing only the base URL.

import OpenAI from "openai";

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

Install the openai package. Create a new client instance with your credentials. Call the chat.completions.create method with your messages. Handle the response data to display or process the output.

Streaming responses

Enable streaming by setting stream to true. The API returns chunks of tokens as they are generated. This reduces perceived latency for end-users. Each chunk includes partial text and usage statistics in the final event.

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)

Process each chunk as it arrives. Accumulate the text content to form the complete response. This method is ideal for chat interfaces where immediate feedback is crucial. Monitor the done event to know when generation completes.

Limits, errors, and context

Your account has a limit of 300 requests per minute. The context window supports 100,000 tokens total. Max output is 16,000 tokens per request. Errors return specific HTTP codes. A 401 error means your key is invalid. A 402 error indicates insufficient credit. A 429 error signals rate limiting. Prepaid credit never expires. Errors are free. Refine your prompts to stay within the 8 MB body limit.

Common questions

How to uncensor chat with this API?

Send your prompt to the <code>/v1/chat/completions</code> endpoint with the model ID <code>uncensored</code>. The model does not refuse lawful adult, fictional, or controversial topics. It outputs text directly without standard content filters. Use parameters like <code>temperature</code> to control creativity.

Is the uncensored LLM API free?

No, it is pay-per-token. Input tokens cost $0.15 per 1M and output tokens cost $0.50 per 1M. You get $0.50 trial credit upon signup. Credit is topped up via crypto only. Errors and refusals do not charge you.

What is the context window size?

The context window is 100,000 tokens for both prompt and completion combined. You can request up to 16,000 output tokens per request. If you do not set <code>max_tokens</code>, the limit defaults to 2,048 tokens. This allows for long conversations or large document processing.

Generate your key now

Sign up, grab your key, and update your base URL. That’s all there is.

Claim trial key