Uncensored AI Chatbot API Documentation
Get started with the uncensored AI chatbot API by configuring your client to point to our OpenAI-compatible base URL and authenticating with your generated API key.
Base URL and Authentication
Our API is a drop-in replacement for standard chat completions, designed for developers who need an uncensored LLM API without content filters. All requests are authenticated via the Authorization header using your unique API key. You can generate a key immediately by signing up with Google or email on the 'Get API key' page. The base URL for all endpoints is https://api.uncensoredaichatbot.top/v1. This ensures compatibility with any OpenAI-compatible SDK or HTTP client. Remember that you are limited to one active key per account; generating a new key immediately revokes the previous one. There is no phone number required for signup, and your prompts are not used for training.
First Request
Start by sending a simple chat completion request to verify your setup. The uncensored AI API accepts standard parameters like model, messages, and max_tokens. The model ID to use is uncensored, which is an open-weight model tuned for unrestricted responses. Ensure your request body stays within the 8 MB limit. If you do not specify max_tokens, the default output limit is 2,048 tokens. You can check your remaining balance via the dashboard, as credit is charged based on real token usage. Errors and refusals do not consume your prepaid credits.
curl https://api.uncensoredaichatbot.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 SDK Integration
For Python developers, the official OpenAI SDK works seamlessly with our base URL. You only need to configure the base_url and api_key parameters. This approach allows you to leverage existing libraries and code patterns while benefiting from our uncensored AI models API. The SDK handles the JSON serialization and HTTP requests automatically. Be aware that the model uncensored does not support embeddings or image generation, so stick to text-based completions. Streaming responses are supported via SSE, but standard synchronous calls are often sufficient for batch processing or lower-volume integrations.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaichatbot.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 SDK Integration
Node.js developers can integrate the API by initializing the OpenAI client with the correct base URL and API key. This method is ideal for server-side applications or backend services that require high-volume text generation. The uncensored AI API key is passed directly in the configuration object. Since we do not offer fine-tuning or model routing, the single model ID uncensored is used for all completions. This simplicity reduces configuration overhead. Ensure you handle the response stream or promise resolution appropriately, depending on your application's architecture. The API supports standard parameters like temperature and stop for controlling generation behavior.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaichatbot.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 Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. This is particularly useful for chat interfaces where you want to display text as it is generated. The final chunk of the stream contains the token usage statistics, allowing you to track costs accurately. Since our uncensored AI API charges by the token, monitoring usage helps manage your prepaid credit. Streaming does not affect the context window or token limits; the total prompt and completion tokens must still fit within the 64,000 token window. Use streaming to improve perceived latency for end-users.
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)
Limits, Errors, and Context
Our API enforces a strict rate limit of 300 requests per minute per key, with a concurrency limit of 8 simultaneous requests. If you exceed these limits, you will receive a 429 Too Many Requests error. Authentication failures return a 401 Unauthorized status, indicating an invalid or revoked key. A 402 Payment Required error means your prepaid credit is exhausted; top up via USDT or USDC to resume service. The context window is 64,000 tokens total, with a maximum output of 16,000 tokens per request. Errors are free, so you do not lose credit if a request fails due to rate limits or network issues.
Questions and answers
What is the context window and token limit?
The context window is 64,000 tokens, combining both the prompt and the completion. The maximum output per request is 16,000 tokens, or 2,048 tokens if you do not specify a <code>max_tokens</code> value. Errors and refusals do not consume tokens from your prepaid credit.
How do I handle rate limits and errors?
You are limited to 300 requests per minute and 8 concurrent requests per key. A <code>429</code> error indicates you have hit the rate limit. If your key is invalid, you receive a <code>401</code>, and if your credit is exhausted, you receive a <code>402</code>. These errors do not charge your account.
Does the uncensored AI API support function calling?
Yes, the API supports function calling via the <code>tools</code> and <code>tool_choice</code> parameters. You can also enforce JSON mode using <code>response_format</code>. These features work with the single <code>uncensored</code> model, allowing for structured data extraction and tool integration in your applications.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.