PT ▾
Start now

API Documentation

Get your uncensored API key and start sending requests immediately. This guide covers the essentials for integrating our uncensored LLM API into your application.

Base URL and Authentication

Use https://api.whataiisuncensored.com/v1 as your base URL. Authenticate every request with your API key in the Authorization header. This endpoint supports standard OpenAI-compatible clients, ensuring straightforward integration.

  • Include Authorization: Bearer YOUR_API_KEY in every request.
  • Retrieve your key from the dashboard after signing up with Google or email.
curl https://api.whataiisuncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Return the capital of France"}]
  }'

First Request

Send a POST request to /v1/chat/completions with your model ID and messages. The model ID is uncensored, designed to answer without content refusals for lawful adult use. This is an open-weight model, not GPT or Claude.

  • Set model to uncensored.
  • Include your user messages in the messages array.
from openai import OpenAI

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

Node SDK Integration

Use the official OpenAI SDK for Node.js with the custom base URL. Configure the client to point to our host while maintaining compatibility with standard parameters. This approach simplifies token management and error handling.

  • Install the openai package.
  • Set baseUrl to our API endpoint.
import OpenAI from "openai";

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

Streaming Responses

Enable streaming by setting stream: true. Responses arrive as Server-Sent Events (SSE), with token usage details in the final chunk. This reduces perceived latency for long-form generation.

  • Handle SSE events incrementally.
  • Parse the last chunk for usage statistics.
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)

Parameters and Constraints

Adjust temperature, top_p, and stop sequences to control output. The context window is 100,000 tokens total. Max output is 16,000 tokens per request, or 2,048 if max_tokens is unset. These parameters allow precise control over creativity and structure.

  • Use temperature for randomness.
  • Set stop sequences for clean breaks.

Rate Limits and Errors

Limit is 300 requests per minute and 8 concurrent requests per key. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Requests exceeding the 8 MB body size will fail. Errors and refusals are free, ensuring cost transparency.

  • Monitor 429 responses for rate limiting.
  • Check 402 responses for credit status.

Common questions

What is the best uncensored LLM API for developers?

Our uncensored LLM API offers an open-weight model tuned for lawful adult content without silent refusals. It provides transparent pricing, prepaid credit that never expires, and full OpenAI compatibility for easy integration.

How do I handle rate limits and errors?

You are limited to 300 requests per minute and 8 concurrent requests per key. Errors return standard HTTP codes like 401 for invalid keys, 402 for no credit, and 429 for rate limits. Refusals and errors incur no charge.

What is the context window and max output?

The context window is 100,000 tokens, including both prompt and completion. The maximum output per request is 16,000 tokens, or 2,048 tokens if you do not set the <code>max_tokens</code> parameter.

Get your key now

Register, copy the token, update your endpoint URL. Done.