EN ▾

Uncensored LLM API for Developersuncensoredlocalllm.cc

Get API key

Uncensored Local LLM: API Documentation

This page documents the uncensored local llm API endpoint, providing the base URL, authentication steps, and integration examples for Python and Node.js clients.

Base URL and Authentication

Connect to the hosted API using the standard OpenAI-compatible base URL. You must include your API key in the Authorization header for every request. The service supports a single model identified as uncensored, which is an open-weight model tuned to answer without content refusals for lawful adult use, though requests involving sexual content with minors are always refused.

  • Base URL: https://api.uncensoredlocalllm.cc/v1
  • Model ID: uncensored
  • Authentication: Bearer token via Authorization: Bearer YOUR_API_KEY

Sign up on the Get API key page using Google or email to receive your key immediately. No phone number is required, and no card is needed for the initial trial credit.

First Request

Send a chat completion request to POST /v1/chat/completions. The API accepts standard parameters like model, messages, and max_tokens. The context window supports 100,000 tokens total (prompt + completion), and if max_tokens is not specified, the response can run to the end of the window.

curl https://api.uncensoredlocalllm.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

If you receive a 401 error, your API key is invalid. A 402 error indicates insufficient prepaid credit, and a 429 error means you have exceeded the rate limit of 300 requests per minute. Errors and refusals do not consume credit.

Python SDK Integration

Use the official OpenAI Python library to integrate quickly. Configure the client with the custom base URL and your API key. The library handles the request structure automatically, allowing you to focus on the conversation history.

from openai import OpenAI

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

This approach works for any standard parameter supported by the endpoint, including temperature, top_p, stop, seed, and penalty settings. The model is optimized for uncensored coding tasks and general purpose generation, making it suitable for developer workflows.

Node.js SDK Integration

Install the OpenAI npm package and initialize the client with the specific base URL. This allows you to use familiar methods like chat.completions.create with the uncensored model.

import OpenAI from "openai";

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

You can set the max_tokens parameter if you want to cap the output length. If you do not set it, the response can run to the end of the window. The API does not support embeddings, image generation, or fine-tuning, so use this endpoint strictly for text completion tasks.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE), allowing you to process tokens as they are generated. Token usage details are provided 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)

Streaming works with all standard parameters, including function calling and JSON mode. This is useful for long-form uncensored coding outputs or continuous content generation without waiting for the full response.

Limits, Errors, and Context

The API enforces strict limits to ensure stability. You are limited to 300 requests per minute per key, with a maximum of 8 concurrent requests. The request body size is capped at 8 MB. Each account holds one active key; generating a new key replaces the old one immediately.

Context is managed per request. The total context window is 100,000 tokens. If you exceed the model's limit or encounter a 429 rate limit error, reduce your batch size or add delays between requests. Paid credit never expires, and trial credit is valid for 7 days.

Specs at a glance

Before you integrate, here is exactly what you get with a key.

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.uncensoredlocalllm.cc/v1
AuthenticationBearer token in the Authorization header
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Context window100,000 tokens (prompt + completion together)
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
SSE streamingSupported (stream: true), usage included at the end
JSON moderesponse_format: {"type": "json_object"}
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Max bodyup to 8 MB per request
Concurrencyup to 8 in parallel per key
Credit expiryno monthly fee; paid credit does not expire
Billingprepaid credit, charged by real token usage; errors and refusals are free
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Keysone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused
Accountsign in with Google or with e-mail + password

HTTP errors

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

What happens if my API key is invalid?

You will receive a 401 Unauthorized error. Ensure your key is copied correctly from the Get API key page and that you are using the correct base URL.

Does the credit expire?

Paid credit never expires. However, the $0.50 trial credit provided to new accounts is valid for 7 days and is not renewable. Claim this credit with one click on your API key page.

Can I use this for coding tasks?

Yes, the uncensored coding llm model is optimized for technical tasks, code generation, and general purpose generation without content refusals for lawful adult use.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Start with trial credit

Email and password, key on screen right away.