EN ▾

API Documentation

Drop our uncensored API into your existing stack with zero friction. This guide covers the essential endpoints, streaming support, and integration patterns for Python and Node.js developers.

Base URL and Authentication

The base URL for all requests is https://api.onlinellmuncensored.com/v1. You authenticate by passing your unique API key in the Authorization header. This key grants access to the single uncensored model optimized for unrestricted text generation.

First Request

Send a standard chat completion request to test connectivity. The API accepts the same JSON structure used by OpenAI clients.

curl https://api.onlinellmuncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summarize the release notes for the latest SDK version"}]
  }'

Ensure you replace YOUR_API_KEY with your actual key. The response returns the generated text and token usage statistics.

Python SDK

Install the official openai package and configure the base URL to point to our endpoint. This allows you to use familiar Python methods for your prompts.

from openai import OpenAI

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

Pass your messages as a list of dictionaries. The client handles serialization and returns the model's response directly.

Node SDK

Initialize the OpenAI client in Node.js with the correct base URL and API key. This setup works with both CommonJS and ES module imports.

import OpenAI from "openai";

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

Call chat.completions.create() with your prompt array. The library manages the HTTP connection automatically.

Streaming Responses

Enable streaming by setting stream: true in your request. You will receive Server-Sent Events (SSE) containing partial text chunks as they are 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)

Process each chunk to build the final response incrementally. The last chunk includes the total token usage for the request.

Limits, Errors, and Context

Each key allows 300 requests per minute and 8 concurrent connections. The context window supports 100,000 tokens total, with a max output of 16,000 tokens. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Requests that exceed the 8 MB body size limit are rejected immediately.

Common questions

Is this the official uncensored LLM online API?

Yes, this is the direct API for our uncensored model. It is compatible with standard OpenAI clients but runs our own open-weight model, not GPT or Claude.

What happens if I run out of credits?

The API returns a 402 error when your prepaid credit is exhausted. You can top up with USDT or USDC at any time to restore access.

Does the model refuse adult content?

No, the model is tuned to answer without refusals for lawful adult topics. It only blocks sexual content involving minors.

Key generation in minutes

Sign up, grab your key, and switch the endpoint. Simple.