Uncensored AI API Documentation
Send one short request before connecting a larger workflow. This guide shows the base URL, Bearer authentication and the Chat Completions request body, followed by streaming and error handling. Check that your account has available credit before running the examples.
- per 1M input tokens
- $0.15
- Output tokens / 1M
- $0.50
- token context
- 100,000
- trial credit
- $0.50
- requests per minute
- 300
Base URL and Authentication
Use this independent text-only Chat Completions endpoint with base URL https://api.uncensoredaiapis.com/v1. Send your current API key in the Authorization header. The service exposes one model ID; keep a saved set of requests to check output, errors and token use before integrating it.
Obtain the current key from your account and keep it server-side. Eligible new accounts can request a $0.50 trial for 7 days; verification and processing may be required. Check the available balance before testing. Regenerating the key revokes the old one.
First Request
Send a standard chat completion request to test the uncensored api. The model ID is simply uncensored. The API accepts text input and returns text output, supporting both simple prompts and structured data.
Use the following curl command to send a basic request. Replace YOUR_API_KEY with your actual key from the dashboard.
The response includes the model's reply, token usage statistics, and completion details. This endpoint supports up to 100,000 tokens for the combined prompt and completion.
Use this text endpoint for a bounded writing or dialogue task. Supply the source material and constraints, then inspect the response before passing it to the rest of your application.
curl https://api.uncensoredaiapis.com/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
Use the official OpenAI Python SDK to interact with the uncensored api. Set the base_url to our endpoint and provide your API key. This allows you to use familiar methods like chat.completions.create with our dedicated model.
The following Python snippet demonstrates a simple text generation request. Ensure you have the openai package installed. The code below shows how to configure the client correctly for our uncensored llm api.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaiapis.com/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
In the OpenAI Node.js client, set this service’s base URL and your current API key, then call chat.completions.create. Read the returned message before passing it to another part of your application. Compatibility here covers the documented Chat Completions methods, not every endpoint offered by OpenAI.
The example below shows how to create a chat completion request. It handles the response and logs the assistant's message. This approach works for both server-side and edge functions.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaiapis.com/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
The Uncensored AI API supports server-sent events (SSE) for streaming responses. This is useful for building chat interfaces or real-time applications. Set the stream parameter to true in your request.
Streaming returns chunks of text as they are generated, allowing for lower perceived latency. The following example demonstrates how to handle streaming in a standard HTTP client or SDK.
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
Understand the operational limits of the uncensored api. You are allowed 300 requests per minute per API key. The maximum request body size is 8 MB. These limits apply to the uncensored llm api to ensure stability.
Common errors include 401 Unauthorized for invalid keys, 402 Payment Required when credits are exhausted, and 429 Too Many Requests for rate limits. The context window is 100,000 tokens for the entire conversation (prompt + completion).
Content limits are strict regarding minors: sexual content involving minors is always blocked. Other lawful adult content is permitted. Credits are prepaid and never expire. Top-ups start at $20, with bonuses for larger amounts.
Technical specifications
If your tool speaks the OpenAI API, these are the details that matter.
| Parameter | Details |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.uncensoredaiapis.com/v1 |
| Model ID | uncensored |
| Authentication | Authorization: Bearer YOUR_KEY |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| SSE streaming | Supported (stream: true), usage included at the end |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Max output | 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"} |
| Function calling | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Concurrency | 8 requests at the same time per key |
| Requests per minute | 300/min per key |
| Request size | 8 MB request body |
| Trial credit | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Credit expiry | no monthly fee; paid credit does not expire |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Account | sign in with Google or with e-mail + password |
| Key management | one active key per account; a new key replaces the old one |
| Content | adult content allowed; sexual content involving minors is refused |
Errors and what to do
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| 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 | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | request body larger than 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
Is the Uncensored AI API the same as OpenAI?
No. We run our own dedicated open-weight uncensored model on our own servers. It is not GPT, Claude, or any other vendor's model. It is OpenAI-compatible in format, but not in origin.
What happens if I exceed the rate limit?
You will receive a 429 Too Many Requests error. The limit is 300 requests per minute per API key. You can regenerate your key if needed, but the limit resets based on time, not key changes.
Do I need a credit card for the trial?
No. The $0.50 trial credit valid for 7 days requires only an email and password. Claim this credit with one click on your API key page. No card is needed to start testing the uncensored api.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.