First request in five minutes
Get your first response from the uncensored llama API in under five minutes. This quickstart covers authentication, standard completions, streaming, and the specific constraints of our OpenAI-compatible endpoint.
Base URL and Authentication
Start by creating an account via the Get API key page. You can sign in with Google or use a standard email and password. Your API key is displayed immediately upon creation. Keep this key secure, as it authenticates all requests to our servers.
Every request must include your key in the Authorization header. The base URL for all endpoints is https://api.uncensoredllama.cc/v1. This URL works with the official OpenAI SDKs and any client configured for OpenAI-compatible APIs. You do not need a credit card to start, as new accounts receive $0.50 of trial credit valid for 7 days. Claim this credit with one click on your API key page.
Chat Completions Endpoint
Send your first request to the POST /v1/chat/completions endpoint. The model identifier is simply uncensored. This endpoint accepts a standard array of messages and returns text output. It is a text-only API; there are no embeddings, image generation, or audio features.
The model runs on our own servers and is tuned to answer without content refusals for lawful adult use. It does not refuse controversial, security-research, or fictional topics. The only hard limit is that sexual content involving minors is always blocked. Below is a basic cURL request to get started.
Python SDK Integration
Using the Python SDK is straightforward. You only need to change the base_url and provide your API key. The rest of the API structure remains identical to the standard OpenAI implementation. This allows you to drop our service into existing codebases with minimal friction.
Remember that our model has a 100,000 token context window, combining prompt and completion. There is no separate output cap unless you specify a lower limit yourself. The following example demonstrates how to initialize the client and send a simple query.
Node SDK Integration
The Node SDK follows the same pattern. Configure the client with our base URL and your key. This ensures compatibility with the standard chat.completions.create method. You can pass standard parameters like temperature, top_p, and stop to control the output.
Our API supports JSON mode via the response_format parameter, which is useful for programmatic data extraction. The following snippet shows how to set up the client and make a request in a Node environment.
Streaming Responses (SSE)
You can enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a partial response. The final chunk includes the complete token usage statistics for the request.
Streaming is ideal for user interfaces where you want to display tokens as they are generated. This reduces perceived latency compared to waiting for the full response. The following example demonstrates how to handle the stream in a standard client.
Rate Limits and Constraints
Each API key is limited to 300 requests per minute and a maximum of 8 concurrent requests. The request body is capped at 8 MB. If you exceed these limits, you will receive a 429 error. Ensure your application handles retries with backoff appropriately.
Authentication errors return a 401 status if the key is invalid. Billing errors return a 402 status if your prepaid credit is exhausted. Errors during processing are free; you are only charged for actual token usage. Credit never expires, so you can top up by crypto (USDT on TRC20, USDC on Base) at any time.
cURL
curl https://api.uncensoredllama.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."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredllama.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredllama.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);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)Capabilities and limits
If your tool speaks the OpenAI API, these are the details that matter.
| Parameter | Details |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.uncensoredllama.cc/v1 |
| API key | Bearer token in the Authorization header |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Streaming | Supported (stream: true), usage included at the end |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Max context | 100,000 tokens (prompt + completion together) |
| JSON mode | response_format: {"type": "json_object"} |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | up to 8 in parallel per key |
| Rate limit | 300 requests per minute per key |
| Max body | up to 8 MB per request |
| Trial credit | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Credit expiry | paid credit never expires, no subscription |
| 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 |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Sign-in | Google or e-mail and password |
| Keys | one key per account, regenerate any time (the old one stops working) |
Error codes
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
How is billing calculated?
You pay $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. You are charged only for actual token usage. Errors and refusals are free. Prepaid credit never expires.
What payment methods are accepted?
We accept top-ups by crypto (USDT on TRC20, USDC on Base). Top-ups range from $20 to $500.
What is the context window size?
The total context window is 100,000 tokens, which includes both the prompt and the completion. There is no separate output cap per request, and if you do not specify a limit, the response can run to the end of the window.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.