API Documentation for developers
Start generating text with our uncensored LLM API in seconds. Use standard OpenAI-compatible endpoints and prepaid crypto credits to pay only for what you use.
https://api.uncensoreai.com/v1uncensored
Base URL and Authentication
Connect to our infrastructure by pointing your client to the designated base URL and supplying your unique API key. We use standard header authentication so you can swap our endpoint into existing OpenAI SDK configurations without rewriting your core logic. You receive one active key per account, and generating a new key immediately invalidates the previous one. This design keeps your integration simple while maintaining clear access control. Sign up via Google or email to see your key instantly. We do not require a phone number or payment method to start.
- Base URL:
https://api.uncensoreai.com/v1 - Auth Header:
Authorization: Bearer YOUR_API_KEY
First Request (POST /v1/chat/completions)
Send your first completion by posting a JSON payload to the chat completions endpoint. The model ID is uncensored and it accepts standard message structures with system, user, and assistant roles. You get immediate text output without complex routing or model selection logic. Errors do not consume your prepaid credits, so you can test freely. The model handles open-weight generation tuned for adult content without refusal. Use this structure to begin your integration.
Python SDK Integration
Use the official Python client to interact with our API seamlessly. Set the base URL and API key in your configuration object before making calls. The library handles JSON serialization and response parsing for you. You can access usage data directly from the response object. This approach works with any standard Python environment supporting async or sync requests. Keep your key secure in environment variables. The code sample demonstrates a basic synchronous call.
Node.js SDK Integration
Integrate with Node.js projects using the standard package manager. Import the client and configure the base URL to point to our servers. The SDK manages the HTTP requests and provides typed responses for TypeScript users. You can easily add headers or modify timeouts if needed. This method suits modern web applications and backend services. Ensure your Node version is compatible with the SDK requirements. The following example shows a simple completion request.
Streaming Responses and Token Usage
Enable real-time output by setting the stream flag to true in your request. The API returns Server-Sent Events (SSE) as tokens are generated. You can display text to users instantly without waiting for the full response. Token usage details appear in the final chunk of the stream. This feature reduces perceived latency for long outputs. Monitor your credit balance as tokens accumulate. Streaming works with all standard parameters like temperature and stop sequences.
Limits, Errors, and Context Window
Your account has a context window of 100,000 tokens for prompt and completion combined. You can send up to 16,000 tokens in a single response if you specify max_tokens. The default output limit is 2,048 tokens if you omit this parameter. Rate limits allow 300 requests per minute and 8 concurrent requests per key. A 401 status means your key is invalid. A 402 status indicates insufficient prepaid credit. A 429 status means you have exceeded the rate limit. Request bodies cannot exceed 8 MB.
cURL
curl https://api.uncensoreai.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "fetch the current server status from the api endpoint"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoreai.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.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoreai.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
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)Common questions
What is the base URL for the uncensored AI API?
The base URL is HTTPS://api.uncensoreai.com/v1. You must set this in your client configuration to route requests correctly.
How do I authenticate my requests?
Include your API key in the Authorization header as a Bearer token. You receive this key immediately after signing up with Google or email.
What happens if I get a 402 error?
A 402 error means your prepaid credit balance is zero. You must top up using USDT (TRC20) or USDC (Base) to resume service.
Get your API key in seconds
Register, copy your key, and update your base URL. Setup is complete.