Uncensored LLM API Quickstart | Uncensored LLM
This quickstart guide covers the base URL, authentication, and core endpoints for the uncensored llm api, enabling you to integrate raw, refusal-free generation into your applications with predictable prepaid billing.
Base URL & Authentication
The API uses standard OpenAI-compatible endpoints, allowing you to swap in our service without rewriting your client logic. The base URL is https://api.uncensoredllm.top/v1. You authenticate by passing your API key in the Authorization header as a bearer token. Each account holds one active key; generating a new key invalidates the previous one immediately. There is no monthly fee or subscription tier—credit is prepaid by crypto (USDT on TRC20, USDC on Base) and never expires. Prompts are not used for training, preserving your data privacy. If you encounter a 401 Unauthorized error, verify that the key is correct and active. For a 402 Payment Required response, you must top up your account via the billing page by crypto (USDT on TRC20, USDC on Base). The GET /v1/models endpoint confirms your access and lists the available model ID.
Chat Completions Endpoint
The core functionality resides in the POST /v1/chat/completions endpoint. You send a JSON payload containing your system prompt and user messages. The model ID is always uncensored. This endpoint handles standard text-in, text-out generation without the need for separate embeddings or vision modules. It is ideal for uncensored coding llm tasks where you need raw output without moralizing filters. The request body supports standard parameters like temperature and top_p to control randomness. If you set max_tokens, the model stops at that limit; otherwise, the response can run to the end of the window. Errors do not consume credit, ensuring you only pay for delivered tokens.
Python SDK Integration
Using the official OpenAI Python library simplifies interaction with the API. You must configure the client to point to our base URL and use your specific API key. This approach works seamlessly with existing codebases designed for OpenAI. The model parameter should be set to uncensored. The library handles JSON serialization and streaming automatically. You can pass a list of message dictionaries to the messages argument. This method is robust for backend services where you need to process the entire response before continuing. It supports all standard parameters documented in the API specification.
Node SDK Integration
For JavaScript and TypeScript environments, the OpenAI Node SDK provides a similar interface. Initialize the client with the custom base URL and your API key. The chat.completions.create method accepts the same message structure as the Python SDK. This is useful for serverless functions or web backends that require synchronous responses. You can control the generation parameters directly in the call. The SDK manages the HTTP requests and parses the JSON response. Ensure you handle the response object carefully to extract the generated text. This integration maintains compatibility with the standard OpenAI ecosystem while delivering the uncensored model behavior.
Streaming Responses
Streaming allows you to receive tokens as they are generated, reducing perceived latency for users. Set the stream parameter to true in your request. The API returns a stream of Server-Sent Events (SSE). Each event contains a partial response chunk. The final chunk includes the token usage statistics, allowing you to track billing accurately. Streaming is particularly effective for long-form content or code generation where immediate feedback is valuable. You can parse these events in real-time to update the user interface progressively. The API supports standard SSE formats, making it easy to integrate with various frontend frameworks.
Limits, Errors & Context Window
The model supports a 100,000-token context window, combining prompt and completion. There is no separate output cap. You are limited to 300 requests per minute and 8 concurrent requests per key. A request body cannot exceed 8 MB. If you exceed the rate limit, you receive a 429 Too Many Requests error. The API does not offer model routing or fine-tuning; it serves a single open-weight model optimized for uncensored generation. Function calling and JSON mode are supported within these constraints. All credits are prepaid and do not expire, providing predictable costs for high-volume usage.
cURL
curl https://api.uncensoredllm.top/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.uncensoredllm.top/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.uncensoredllm.top/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)What the API supports
Before you integrate, here is exactly what you get with a key.
| Parameter | Details |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Methods | POST /v1/chat/completions · GET /v1/models |
| API key | Authorization: Bearer YOUR_KEY |
| Base URL | https://api.uncensoredllm.top/v1 |
| Model ID | uncensored |
| Max context | 100,000 tokens (prompt + completion together) |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| JSON mode | response_format: {"type": "json_object"} |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Concurrency | up to 8 in parallel per key |
| Requests per minute | 300/min per key |
| Max body | up to 8 MB per request |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Credit expiry | no monthly fee; paid credit does not expire |
| Volume bonus | +5% on $50+, +10% on $100+, +15% on $200+ |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Free trial | $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 |
| Key management | one active key per account; a new key replaces the old one |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Sign-in | Google or e-mail and password |
When a request fails
Every error is JSON with a type you can switch on. You are never charged for an error.
| Status | Type | Reason |
|---|---|---|
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 | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
Does the API support image or audio generation?
No, the API is text-only. It serves a single large language model for chat completions. It does not support embeddings, image generation, audio, or video. You must handle multimodal tasks separately if needed.
How is billing calculated and refunded?
Billing is based on prepaid credit charged by real token usage. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals are free. Credit never expires and is not refunded, but double charges can be fixed via Support.
What is the maximum output length?
There is no separate output cap. If you do not specify max_tokens, the response can run to the end of the window. The total context window, including the prompt, is 100,000 tokens.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.