Uncensored AI API Quickstart
Integrate our uncensored AI API by updating your base URL and key, then send text to the single optimized model for direct, uncensored responses without complex routing.
https://api.uncensoredrouteropen.com/v1uncensored
Install the SDK
Start by installing the official OpenAI SDK for your language. This library handles the HTTP requests and JSON parsing for you. It works with our endpoint because we follow the OpenAI chat-completions specification. Install the package via your standard package manager. Then import the client class in your script. This gives you the tools to connect to the API immediately.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredrouteropen.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)
Configure Your Base URL
Point your client to our specific endpoint. You must set the base URL to HTTPS://api.uncensoredrouteropen.com/v1. Use your API key in the Authorization header. This ensures all requests go to our uncensored model. The standard OpenAI SDK accepts this override. It ignores the default endpoint. Your code remains compatible with standard libraries.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredrouteropen.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);
Make Your First Request
Send a simple message to generate text. Use the model ID "uncensored" in your request. This open-weight model answers without typical refusals. You can send prompts with the system role. The API returns a text response. Errors like invalid keys return 401. Missing credit returns 402. These are standard HTTP codes.
curl https://api.uncensoredrouteropen.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "get today date"}]
}'
Enable Streaming & Tools
Use streaming for real-time token output. Set stream to true in your request. The API sends Server-Sent Events. Each chunk contains partial text. The final chunk includes token usage. You can also define tools for function calling. The model follows the tool schema. This enables complex agent workflows.
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 JSON Mode & Parameters
Force structured output with JSON mode. Set response_format to json_object. The model returns valid JSON. You can adjust temperature for creativity. Use top_p for nucleus sampling. Set stop sequences to halt generation. These parameters control the output style. They work exactly like the OpenAI API.
Limits, Errors, and Context
Your key allows 300 requests per minute. You can run 8 concurrent requests. The request body must stay under 8 MB. The context window supports 100,000 tokens total. Max output is 16,000 tokens per request. Errors are free. Credit never expires. Use the support page for double charges.
Frequently asked questions
What is the open router uncensored alternative for direct integration?
Our API provides direct access to one uncensored model without complex routing. You change the base URL and key to use it. It is an open-weight model tuned for lawfully adult content.
How do I handle rate limits and errors?
You get 300 requests per minute and 8 concurrent requests. A 429 error means you hit the limit. A 401 error means your key is invalid. A 402 error means you need to top up your crypto credit.
What is the context window size?
The context window is 100,000 tokens for prompt and completion. You can generate up to 16,000 tokens in one request. This allows long conversations and large documents.
Retrieve your API key
Sign up, copy your key, and update your base URL. That is the entire configuration.