Uncensored AI Chatbot API Documentation
Get started with the uncensored AI chatbot API in minutes. This guide covers authentication, basic requests, streaming, and tool usage for your NSFW or roleplay applications.
Base URL and Authentication
To use the uncensored LLM API, configure your client with the base URL https://api.uncensoredaichatbot.top/v1. The service is OpenAI-compatible, meaning you can use standard SDKs by updating the base_url and providing your API key.
Sign up via Google or email to receive your key immediately. No phone number is required. Keep your key secure; it authenticates all requests to the uncensored model. We charge only for raw token usage, so errors are free.
First Request
Send a standard chat completion request to generate text. The uncensored AI api model responds to lawful adult and roleplay prompts without content refusals. Use the messages array to structure your conversation history.
- Input tokens cost $0.15 per 1M.
- Output tokens cost $0.50 per 1M.
- Ensure you have prepaid credit before sending.
Below is a basic cURL example to get started.
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
Integrate directly into your Python backend using the official OpenAI SDK. Point the client to our base URL and set your API key. This uncensored AI chatbot approach allows you to handle context windows up to 100,000 tokens efficiently.
Remember that the uncensored llm api does not support image or audio generation. It is strictly for text. Set your model parameter to uncensored to ensure you are hitting the correct endpoint.
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.js SDK Usage
For JavaScript or TypeScript environments, the Node SDK works identically. Configure the fetch or http agent to point to our API. This is ideal for high-volume web applications needing unrestricted text generation.
You can mix system prompts with user messages to guide the model's behavior. The uncensored api key allows you to replace OpenAI or other vendor calls without changing your code structure significantly.
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
Use Server-Sent Events (SSE) for real-time token delivery. This reduces perceived latency for users in roleplay or chat interfaces. The last chunk of the stream includes the full token usage statistics for billing.
Streaming is supported via the standard OpenAI-compatible format. Handle partial responses gracefully in your UI. The uncensored ai api ensures that streaming works consistently with standard SDKs.
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
The context window is 100,000 tokens total (prompt + completion). If max_tokens is unset, the response can run to the end of the window.
Rate Limits
- 300 requests per minute per key.
- 8 concurrent requests per key.
Common Errors
- 401 Unauthorized: Invalid or missing API key.
- 402 Payment Required: Insufficient prepaid credit.
- 429 Too Many Requests: You have exceeded the rate limit.
Content involving minors is always refused. Other adult content is allowed.
Questions and answers
Does the prepaid credit expire?
No, your prepaid credit never expires. You can top up by crypto (USDT on TRC20, USDC on Base) at any time. Errors and refusals do not consume your credit.
What is the context window size?
The model supports a 100,000 token context window, combining both prompt and completion tokens. Output can run to the end of the window.
Can I use this for function calling?
Yes, the uncensored api supports function calling (tools). You can define tools and use the tool_choice parameter to control how the model uses them.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
What the API supports
Everything the endpoint can and cannot do, in one place — check it before you top up.
| Spec | Value |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Model | uncensored |
| Base URL | https://api.uncensoredaichatbot.top/v1 |
| API key | Authorization: Bearer YOUR_KEY |
| Max context | 100,000 tokens, input and output combined |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| JSON mode | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Parallel requests | up to 8 in parallel per key |
| Request size | up to 8 MB per request |
| Requests per minute | 300 requests per minute per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Volume bonus | +5% on $50+, +10% on $100+, +15% on $200+ |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| 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 |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Credit expiry | no monthly fee; paid credit does not expire |
| Account | Google or e-mail and password |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Key management | one active key per account; a new key replaces the old one |
HTTP errors
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
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 | model busy — retry in a few seconds |