Uncensored Aichat/Integrate Uncensored AI Chat in Minutes
Integrate Uncensored AI Chat in Minutes
Get your API key and send your first message to our uncensored LLM API in under five minutes. This guide covers authentication, standard requests, streaming, and tool usage with the single uncensored model.
https://api.uncensoredaichat.top/v1uncensored
Prerequisites and Base URL
Before sending requests, you need an API key. Sign up on the Get API key page using Google or an email address. Your key appears immediately; no credit card is required for the initial trial. All requests use the OpenAI-compatible base URL: https://api.uncensoredaichat.top/v1. You can use any standard OpenAI SDK by pointing it to this URL and supplying your key. The model ID is uncensored. This is a single, open-weight model tuned for minimal refusals, not a router to other vendors.
Authentication and First Request
Include your API key in the Authorization header as a Bearer token. The API expects standard OpenAI JSON payloads. If the key is invalid, you receive a 401 error. If your prepaid credit is exhausted, you get a 402 error. Errors and refusals do not consume tokens, so you are only charged for actual usage. Use the following cURL command to send a simple prompt.
curl https://api.uncensoredaichat.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."}]
}'
This request sends a user message to the uncensored model and expects a text response. Check the response body for the generated text in the choices array.
Python SDK Integration
Using the official openai Python library simplifies request handling. Configure the client with your API key and the correct base URL. This approach handles JSON serialization and retries automatically. It is ideal for backend services or scripts where you need reliable, synchronous responses.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaichat.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)
The code snippet demonstrates initializing the client and making a chat completion call. Ensure you install the latest version of the SDK to support all current parameters like temperature and top_p.
Node.js SDK Usage
For JavaScript or TypeScript environments, the Node SDK works identically to the Python version. Point the base URL to our endpoint. This is useful for serverless functions or web servers that process user inputs in real time.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaichat.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);
This example shows how to import the client and send a request. The response object contains the same structure as the API, allowing you to extract the content easily. Remember that the model ID is always uncensored.
Streaming Responses
For better user experience, enable streaming by setting stream: true. The API returns data incrementally via Server-Sent Events (SSE). Token usage statistics are included in the final chunk. This reduces perceived latency for end-users interacting with your chat interface.
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)
Handle the stream events to display text as it generates. If the connection drops, you may need to implement reconnection logic depending on your application needs. The context window supports up to 100,000 tokens total, allowing for long conversations without immediate truncation.
Rate Limits and Error Handling
Each API key is limited to 300 requests per minute and 8 concurrent requests. If you exceed these, you receive a 429 error. The request body must not exceed 8 MB. If you need a new key, generating one replaces the old active key. Content limits apply: sexual content involving minors is always refused. Other lawful adult content is permitted. Check your prepaid balance regularly to avoid 402 errors.
Under the hood: specs
Everything the endpoint can and cannot do, in one place — check it before you top up.
| Feature | Support |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| API key | Bearer token in the Authorization header |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.uncensoredaichat.top/v1 |
| Model ID | uncensored |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| SSE streaming | Supported (stream: true), usage included at the end |
| JSON mode | response_format: {"type": "json_object"} |
| Context window | 100,000 tokens (prompt + completion together) |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | 8 MB request body |
| Concurrency | 8 requests at the same time per key |
| Rate limit | 300 requests per minute per key |
| 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 |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Credit expiry | paid credit never expires, no subscription |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Sign-in | sign in with Google or with e-mail + password |
| Keys | one active key per account; a new key replaces the old one |
| Content policy | adult content allowed; sexual content involving minors is refused |
Error reference
Every error is JSON with a type you can switch on. You are never charged for an error.
| Code | Type | Meaning |
|---|---|---|
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 | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
How does billing work for the uncensored ai api?
You pay per token with prepaid credit that never expires. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals are free. Top up using by crypto (USDT on TRC20, USDC on Base).
Is this the same as Character.ai or OpenRouter?
No. We offer a single, direct API for one uncensored model, not a routing service or a web chat interface. Unlike OpenRouter, we do not aggregate multiple vendors. We also do not require a monthly subscription; you only pay for what you use.
What happens if I run out of credit?
Requests will return a 402 error indicating insufficient funds. Your existing credit does not expire, so you can top up at any time. You can add any whole amount between $20 and $500, with bonus credits for larger top-ups.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.