EN ▾
Get API key

First request in five minutes

Get started with the uncensored API in under five minutes using standard OpenAI SDKs. This guide covers setup, authentication, and your first request with zero configuration overhead.

per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Prerequisites and Setup

Before making requests, ensure you have an API key. Sign up via Continue with Google or email on the Get API key page. The key displays immediately; no phone number or credit card is required. You also receive $0.50 in trial credit valid for 7 days, though prepaid credit never expires and is topped up via crypto (USDT/TRC20 or USDC/Base). Your account supports one active key; generating a new one replaces the old.

The API is an uncensored model endpoint compatible with OpenAI clients. It serves text in, text out. No embeddings, images, or fine-tuning are offered. Ensure your SDK client is configured to handle standard chat-completion formats.

Configuring the Base URL

Direct your SDK client to our base URL: https://api.llamauncensored.cc/v1. This allows you to use the same client code you would for OpenAI, simply by swapping the base URL and API key. The uncensored model ID is used for all completions.

Authentication is handled via the standard Authorization: Bearer <key> header. No special headers are needed for function calling, JSON mode, or streaming. If you are migrating from another provider, verify that your client correctly overrides the default base URL.

Making Your First Chat Request

Send a POST request to /v1/chat/completions. The model ID is always uncensored. Below is a basic example using curl:

curl https://api.llamauncensored.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."}]
  }'

This request returns a text response. The model does not refuse lawful adult, fictional, or controversial topics. However, a hard content limit applies: requests involving sexual content with minors are always refused. For other topics, expect raw output without typical guardrails. Check the response for choices[0].message.content to access the generated text.

Handling Streaming Responses

Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Token usage and final content are delivered in the last chunk. This is ideal for real-time UIs. Use the official SDKs to parse events automatically, or handle SSE manually if using a lightweight client. Streaming does not affect pricing; you are charged for actual tokens consumed.

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)

Ensure your client handles partial chunks correctly. The final chunk contains the complete message and token counts. Errors during streaming may result in partial data; implement retry logic if necessary.

Using Tools and JSON Mode

The API supports function calling and JSON mode. Use response_format: {"type": "json_object"} for structured outputs. For tools, pass tools and tool_choice parameters. The model follows standard OpenAI tool-use formats. No special configuration is needed beyond the SDK’s standard parameters.

from openai import OpenAI

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

Python users can leverage the official openai package. Set the base URL and key, then call chat.completions.create. The SDK handles serialization. For Node.js, use the same approach with the @anthropic-ai/sdk or openai package, adjusting for Node-specific syntax.

Understanding Token Limits and Context

The context window is 100,000 tokens total (prompt + completion). There is no separate output cap; if max_tokens is unset, the response can run to the end of the window. Request body size is limited to 8 MB. Rate limits are 300 requests per minute and 8 concurrent requests per key. Errors like 401 (invalid key) or 402 (no credit) halt execution. 429 indicates rate limiting. Credit is charged per token; errors are free.

import OpenAI from "openai";

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

Monitor token usage in the response headers or body. Prepaid credit is consumed by real usage. Refunds are not issued for credit, but double charges are fixed via Support. No subscription fees apply.

Technical reference

Use this table to decide whether the API fits your project before you buy credit.

SpecValue
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.llamauncensored.cc/v1
MethodsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
API keyAuthorization: Bearer YOUR_KEY
Context window100,000 tokens, input and output combined
StreamingYes — server-sent events; the last chunk carries token usage
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Structured outputJSON object mode via response_format json_object
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max bodyup to 8 MB per request
Rate limit300/min per key
Parallel requests8 requests at the same time per key
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Credit expiryno monthly fee; paid credit does not expire
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Accountsign in with Google or with e-mail + password
Keysone active key per account; a new key replaces the old one

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

StatusTypeReason
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What happens if I exceed the 8 concurrent requests limit?

You will receive a 429 Too Many Requests error. Wait until active requests complete or reduce parallelism. The limit is per API key, so use separate keys for higher concurrency.

Is the trial credit refundable or does it expire?

The $0.50 trial credit expires after 7 days. Prepaid credit topped up via crypto never expires and is not refundable, though double charges can be fixed via Support.

Does the API support image or audio generation?

No. This is a text-only API for chat completions. It does not offer embeddings, image, audio, video, or fine-tuning capabilities. Use standard text processing for multimodal tasks.

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.