ru ▾
Open account

Uncensored AI API Quickstart

Get started with the uncensored AI API in minutes. Drop in your key, set the base URL, and start generating text without content refusals.

Authentication and base URL setup

Use your API key with the base URL https://api.bestuncensoredlocalllm.com/v1. This endpoint works with the official OpenAI SDKs and any compatible client. You receive the key immediately after signing up with Google or email. No phone number is required to create your account.

Store the key in an environment variable for security. Pass it in the Authorization header as a Bearer token. The service bills strictly by usage, so you only pay for tokens you actually consume. Errors do not consume credit.

Sending a chat completion request

Send a POST request to /v1/chat/completions with your messages and the model ID uncensored. The model answers freely without refusing lawful adult or controversial topics. It supports a context window of 100,000 tokens for prompt and completion combined.

Set parameters like temperature and top_p to control creativity. The API returns text responses directly. You can adjust the output limit with max_tokens, which defaults to 2,048 if omitted.

Streaming responses via SSE

Enable streaming by setting stream to true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. This is ideal for chat interfaces where users see text as it generates.

Each chunk contains partial text and usage data. The final chunk includes the total token count for billing. You can parse these events in your preferred language to display results instantly.

Function calling and tool usage

Use the tools parameter to define functions the model can call. The API supports tool choice and function arguments. This allows you to integrate the LLM into your own workflows or applications.

Define tool schemas in your request. The model returns tool calls when appropriate. You handle the execution and feed results back if needed. This feature works with the standard OpenAI-compatible format.

JSON mode for structured output

Set response_format to {"type": "json_object"} to force JSON output. This ensures consistent formatting for programmatic use. The model adheres to the structure you expect.

Parse the response directly into your code. This reduces errors from malformed text. Use this for data extraction or structured content generation tasks.

Understanding tokens and billing

Pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. You can top up with crypto only, receiving bonus credit for larger amounts. Errors are free.

Track usage via the API response headers or the final streaming chunk. No subscription fees apply. You keep your credit forever. The model ID is uncensored for all requests.

cURL

curl https://api.bestuncensoredlocalllm.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summit height in meters"}]
  }'

Python

from openai import OpenAI

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

import OpenAI from "openai";

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

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)

FAQ

What is the best uncensored local LLM for quick integration?

The <code>uncensored</code> model is optimized for quick integration via our OpenAI-compatible API. It supports a 100,000-token context window and streams responses for low latency. Use the standard SDKs to get started immediately.

How do I handle rate limits?

The limit is 300 requests per minute and 8 concurrent requests per key. A 429 error indicates you have exceeded these limits. Reduce your request frequency or wait for the window to reset. Use exponential backoff in your client code.

What does a 401 error mean?

A 401 error means your API key is invalid or expired. Check that you copied the key correctly from your account dashboard. Regenerate a new key if necessary. The old key becomes invalid immediately upon regeneration.

Get your API key

Sign up, copy the key, update your base URL. That is all you need.