Uncesored ai API Documentation
Start generating unrestricted text with our OpenAI-compatible API today. Pay only for the tokens you use with prepaid crypto credit and zero hidden fees.
Base URL and Authentication
The base URL for all requests is https://api.uncesoredai.com/v1. You authenticate by passing your API key in the Authorization header as a Bearer token. This setup works with any standard OpenAI-compatible client or SDK. You receive your key immediately after signing up with Google or an email address. There is no phone number required for account creation. Your key is unique to your account and replaces any previous active key.
First Request
Send a completion by POSTing to /v1/chat/completions. The model ID is uncensored. This endpoint accepts text input and returns text output. It does not support embeddings, images, or audio. You can start by sending a simple system prompt and user message. The API responds with generated text based on your instructions. Errors and refusals do not consume your prepaid credit.
curl https://api.uncesoredai.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top five open source LLMs for local deployment"}]
}'
Python SDK Integration
Use the official OpenAI Python library to interact with the API. Set the base URL to our endpoint and provide your API key. The library handles serialization and request formatting automatically. You can specify the model as uncensored for unrestricted generation. Streaming and JSON modes are supported via the same client interface. This approach minimizes boilerplate code for your applications.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncesoredai.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
The Node.js SDK follows the same configuration pattern. Configure the base URL and API key in the client instance. Set the model name to uncensored to access the uncensored model. You can make synchronous or asynchronous requests depending on your use case. The SDK manages the connection pool and retries automatically. This ensures reliable integration into your JavaScript or TypeScript projects.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncesoredai.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
Enable streaming by setting stream: true in your request parameters. The API returns a Server-Sent Events (SSE) stream of partial completions. This allows you to display text to users in real-time. The final chunk of the stream contains the total token usage statistics. Streaming reduces perceived latency for long-form content generation. You can parse the chunks to update your UI incrementally.
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
Your account supports 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. The context window is 100,000 tokens for prompt and completion combined. You may encounter a 401 error if the API key is invalid. A 402 error indicates insufficient prepaid credit. A 429 error means you have exceeded the rate limit. Requests are refused if they contain sexual content involving minors. Error responses do not charge your credit balance.
Common questions
What is the base URL for the uncensored AI API?
The base URL is HTTPS://api.uncesoredai.com/v1. You use this endpoint with standard OpenAI-compatible clients by updating the base_url configuration. Authentication is handled via the Authorization header with your unique API key.
How does the uncensored model handle context length?
The model supports a context window of 100,000 tokens for both prompt and completion. You can generate up to 16,000 tokens per request. If you do not set max_tokens, the default output limit is 2,048 tokens. This allows for extensive conversations or long-form document generation.
What happens if I get a 402 error?
A 402 error indicates that your prepaid credit balance is insufficient to cover the request. You can top up your credit using USDT on TRC20 or USDC on Base. Payments start from $20 and include bonus credit tiers. Once topped up, you can resume sending requests immediately.
Get your API key now
Sign up, copy the key, update the base URL. Done.