hi ▾
Create key

API Documentation

Integrate the uncensored LLM API into your application with this quickstart guide. You will learn to authenticate, send requests, and handle streaming responses using standard OpenAI-compatible tools.

Base URL and Authentication

The API base URL is https://api.llmunlimited.com/v1. Pass your API key in the Authorization header as a bearer token. Every request requires this header to authenticate your usage against your prepaid credit.

  • Get your key on the Get API key page.
  • One active key per account; a new key replaces the old one.

Keep your key secure. It grants access to your prepaid balance.

Your First Request

Send a POST request to /v1/chat/completions with your message. The model ID is always uncensored.

This call processes text through our dedicated large language model. It does not refuse lawful adult or controversial topics.

curl https://api.llmunlimited.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Generate the first ten digits of pi"}]
  }'

Check the response for the generated text and token usage.

Python SDK Integration

Use the official OpenAI Python library. Point it to our base URL and provide your key.

This approach works for most standard applications. You can adjust parameters like temperature and top_p to control randomness.

from openai import OpenAI

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

Handle errors gracefully. A 401 error means your key is invalid. A 402 error indicates insufficient credit.

Node SDK Integration

Initialize the OpenAI client in Node.js with the same base URL. Pass the model ID uncensored in your completion call.

Node developers can integrate this easily into serverless functions or backend services.

import OpenAI from "openai";

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

Ensure you handle the response data correctly. The API returns JSON by default unless you specify JSON mode.

Streaming Responses with SSE

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream.

This allows you to display text token-by-token. Token usage is reported in the last chunk of the stream.

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)

Parse the SSE events to update your UI in real time. This improves user experience for long responses.

Rate Limits, Errors, and Context Window

You are limited to 300 requests per minute per key and 8 concurrent requests. The request body must not exceed 8 MB.

The context window is 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens unless you set max_tokens.

Common errors include 401 (invalid key), 402 (no credit), and 429 (rate limit). Errors do not consume credit.

Common questions

Does the uncensored LLM API support function calling?

Yes. You can use the <code>tools</code> and <code>tool_choice</code> parameters in your chat completions request. The model supports standard tool definitions for function calling.

What happens if I exceed the rate limit?

You will receive a 429 Too Many Requests error. You can retry after a brief delay. The limit is 300 requests per minute per key.

Is the context window unlimited?

No. The context window is 100,000 tokens for prompt and completion together. The maximum output per request is 16,000 tokens.

Get your API key

Register, copy the key, and update your base URL. That’s all the configuration required.

Create key