API Reference
Drop-in uncensored access with a standard OpenAI-compatible API endpoint that requires zero code changes to switch from existing providers.
Authentication and Base URL
Use your API key with the https://api.routerllm.cc/v1 base URL. Sign up with Google or an email and password to get your key instantly. No phone number is required. The key authenticates all requests to the chat-completions endpoint.
curl https://api.routerllm.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top five python libraries for web scraping."}]
}'Keep your key secure. A single active key replaces the old one if you generate a new one. Errors and refusals are free, so you can test safely.
Chat Completions Endpoint
Send prompts to the POST /v1/chat/completions endpoint. The model ID is uncensored. It is an open-weight model tuned for lawful adult use, not a vendor model like GPT or Claude.
from openai import OpenAI
client = OpenAI(base_url="https://api.routerllm.cc/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)The context window is 100,000 tokens for prompt and completion together. You get 16,000 tokens of output by default, or 2,048 if you omit max_tokens.
Streaming with SSE
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Token usage data appears in the last chunk of the stream.
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)This approach reduces perceived latency for long responses. Use it when building chat interfaces that benefit from progressive text rendering.
Function Calling and Tools
Pass tools in the tools array. The model supports function calling with tool_choice options. Use this for structured data extraction or automated workflows.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.routerllm.cc/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);Define your function schemas clearly. The API handles the routing between your user prompt and the tool definitions. Ensure your code parses the tool calls correctly.
JSON Mode and Parameters
Set response_format to {"type": "json_object"} for strict JSON output. Control generation with temperature, top_p, stop, and seed. Adjust penalties for presence and frequency to refine output style.
Use these parameters to tune reliability. JSON mode is essential for parsing machine-readable responses. The model remains uncensored even with strict formatting.
Error Handling and Limits
Expect 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. The limit is 300 requests per minute and 8 concurrent requests per key. The max request body size is 8 MB.
Check the status code to determine the cause. Top up with USDT or USDC to continue. Credit never expires, so you can pause usage without losing funds.
Model Info and Token Usage
Query GET /v1/models to verify available models. The only model is uncensored. It serves text in and text out. No embeddings, images, or audio are supported.
Track token usage in the response headers or stream end. Pricing is transparent: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Prepaid credit covers all usage.
Frequently asked questions
What is the best LLM router for uncensored access?
RouterLLM provides a drop-in uncensored LLM router with a standard OpenAI-compatible API. It eliminates vendor lock-in and complex routing logic. You only need to change the base URL and key.
How does pricing work for the uncensored AI API?
Pricing is transparent per token: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free. Credit is prepaid via crypto and never expires.
Is this an open router alternative for NSFW content?
Yes, it serves one uncensored model tuned for lawful adult use. It refuses only sexual content involving minors. The API is compatible with standard OpenAI SDKs for easy integration.
Get your API key
Sign up, copy the key, update your base URL. Done.