Uncensored AI API Quickstart
Integrate our uncensored AI API in minutes using the standard OpenAI SDK. Send text, enable streaming, and call tools with a drop-in compatible endpoint.
Authentication and Base URL
The API uses standard API key authentication. Send your key in the Authorization header for every request. The base URL is https://api.uncensoredopenrouter.com/v1. This URL works with the official OpenAI SDKs by changing base_url.
No complex setup is required. Just generate a key from the dashboard and pass it to your client.
Sending Your First Chat Completion
Send a POST request to /v1/chat/completions with your messages. The model ID is uncensored. It responds with text outputs that do not refuse lawful adult content.
Here is a basic curl example to get started:
curl https://api.uncensoredopenrouter.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Calculate the hash of this file path"}]
}'The context window is 100,000 tokens for prompt and completion combined.
Using Python SDK
Use the official OpenAI Python library. Set base_url and api_key before calling chat.completions.create. This ensures your code runs against our uncensored model.
Example configuration:
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredopenrouter.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)Pass model="uncensored" in your calls.
Node SDK Integration
Install the OpenAI npm package. Configure the client with the custom base URL and your API key. This allows seamless integration into Node.js applications.
Code snippet:
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredopenrouter.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);Requests are processed immediately. No waiting for queue allocation.
Enabling Streaming for Real-Time Tokens
Set stream: true to receive tokens as they are generated. This reduces perceived latency for users. The API uses Server-Sent Events (SSE).
Streaming example:
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)Token usage is included in the last chunk for billing accuracy.
Rate Limits and Errors
The API enforces 300 requests per minute per key. If you exceed this, you get a 429 error. A 401 error means your key is invalid. A 402 error indicates insufficient credit.
Errors are free. You only pay for successful token usage. The 100,000 token context window resets per request.
Frequently asked questions
Is this the official OpenRouter uncensored API?
No. We are an independent service. We do not serve OpenRouter's models or infrastructure. Check OpenRouter's documentation for their specific limits and pricing. Our API is a separate, hosted solution with its own models.
How does the prepaid credit work?
Credit is charged by real token usage. Errors and refusals are free. Credit never expires. You can top up with crypto only, starting from $20.
What is the context window size?
The context window is 100,000 tokens for prompt and completion together. You can send up to 16,000 tokens per request.
Unlock your API key
Register, grab the key, and update your base URL. That is the entire process.