EN ▾

Quickstart Guide

Get your uncensored API key and start sending requests in under two minutes. This guide covers the exact steps to integrate the openai compatible API into your workflow.

Prerequisites and SDK Installation

Install the official SDK for your preferred language before making any requests. This ensures compatibility with the base URL and authentication headers.

  • Python: pip install openai
  • Node.js: npm install openai

These libraries handle the underlying HTTP communication and JSON parsing for you.

Authentication and Base URL Setup

Configure your client with the specific base URL and your unique API key. This directs traffic to our uncensored inference engine instead of the standard provider.

Set the environment variable OPENAI_API_KEY or pass it directly in your client initialization.

The base URL must point to https://api.llmuncensoredapi.com/v1 to ensure proper routing.

Basic Text Completion Request

Send a simple POST request to generate text. This method works for any standard chat completion use case.

The model responds with raw text, avoiding the typical refusals found in other models.

Use the model ID uncensored for all requests.

Here is a basic example:

curl https://api.llmuncensoredapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Run health check on the api endpoint"}]
  }'

Streaming Responses with SSE

Use streaming for real-time token generation. This is ideal for chat interfaces or long-form content generation.

Set stream: true in your request body.

The API returns Server-Sent Events (SSE) as tokens become available.

This approach reduces perceived latency for the user.

Example streaming code:

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)

Function Calling and Tool Use

Enable function calling by defining tools in your request. This allows the model to output structured JSON for external execution.

Use tool_choice to control when the model calls a function.

This feature is critical for automation workflows.

Python example:

from openai import OpenAI

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

JSON Mode for Structured Output

Force the model to output valid JSON using the response_format parameter.

Set response_format to {"type": "json_object"}.

This ensures consistent parsing for downstream applications.

Node.js example:

import OpenAI from "openai";

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

Understanding Tokens and Limits

The context window supports up to 100,000 tokens total. Each request can output up to 16,000 tokens.

Rate limits are 300 requests per minute per key.

Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits.

Errors do not consume your prepaid credit.

Frequently asked questions

What is the uncensored LLM model ID?

Use the model ID "uncensored" for all requests. This ID points to our open-weight model tuned for unrestricted output.

How does billing work?

You pay per token usage. Input tokens cost $0.15 per 1M, and output tokens cost $0.50 per 1M. Errors and refusals are free.

Can I use this with the official OpenAI SDK?

Yes. The API is fully OpenAI compatible. Just update the base URL and API key in your existing client configuration.

Get your key in seconds

Sign up, copy your API key, and update your base URL. That is all you need to do.