What this is, and what it is not
OpenRouter is a router: one account that forwards requests to many models from many vendors. This site is something narrower. It is a hosted API for one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. The model ID is uncensored. It is not the official API of Meta, Mistral, Qwen, DeepSeek, OpenAI or any other vendor, and it does not route between them. If you want to see how we talk about that distinction in detail, the uncensored DeepSeek explainer covers one common source of confusion.
That narrowness is the reason to pick it, and also the reason not to. You pick it when your application needs a model that does not refuse fiction, roleplay, or sensitive but lawful subjects, and you would rather have one stable endpoint than a catalogue. You skip it when you need to switch between dozens of models, need vision or image output, or need embeddings. None of those are offered here.
One rule is fixed: no sexual content involving minors. Everything else about use is your responsibility under the terms.
Connection details
Because the API follows the OpenAI format, integration comes down to three values.
| Setting | Value |
|---|---|
| Base URL | https://api.openrouteruncensored.cc/v1 |
| Model | uncensored |
| Auth header | Authorization: Bearer YOUR_KEY |
| Endpoints | POST /v1/chat/completions, GET /v1/models |
Create the key on the API key page. Sign-up is with Google or with email and password, and new users can claim a $0.50 trial credit with one click on that page. The trial lasts 7 days and needs no payment method. Store the key in an environment variable, never in source control.
The official Python SDK reads OPENAI_BASE_URL and OPENAI_API_KEY from the environment, which means many existing programs work with no code edits at all:
export OPENAI_BASE_URL="https://api.openrouteruncensored.cc/v1"
export OPENAI_API_KEY="your-key-here"
# then call the model by name in your existing code: model="uncensored"
Python, Node and curl
Start with the plain request, which proves the key and the network path before you add frameworks.
curl https://api.openrouteruncensored.cc/v1/chat/completions -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{
"model": "uncensored",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Give me three names for a fantasy tavern."}
],
"temperature": 0.8
}'
In Python with the openai package:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.openrouteruncensored.cc/v1",
api_key=os.environ["API_KEY"],
)
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise the plot of Hamlet in 3 lines."}],
)
print(resp.choices[0].message.content)
print(resp.usage) # prompt_tokens, completion_tokens, total_tokens
In Node, the pattern is the same with the official package:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.openrouteruncensored.cc/v1",
apiKey: process.env.API_KEY,
});
const stream = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Write a two-line villain monologue." }],
stream: true,
stream_options: { include_usage: true },
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
Streaming runs over server-sent events with stream: true, and usage arrives at the end. Remember that a streamed request holds its concurrency slot until the stream finishes, which matters when you size worker pools.
Frameworks and editors that accept a custom base URL
Anything built on the OpenAI client library usually exposes a base URL option. Check each tool's current documentation, since menus and parameter names change between versions.
LangChain
The langchain-openai package's ChatOpenAI class takes a base_url and an API key, so a chain written for another OpenAI-compatible host moves over by changing those arguments:
import os
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="uncensored",
base_url="https://api.openrouteruncensored.cc/v1",
api_key=os.environ["API_KEY"],
temperature=0.7,
)
print(llm.invoke("Name two pitfalls of regex-based parsing.").content)
Editors and chat clients
Several editors and front ends let you override the OpenAI base URL and type your own key and model name. Cursor has such an override in its model settings. SillyTavern lets you add an OpenAI-compatible endpoint. In each case you enter the base URL above, paste the key and use uncensored as the model name. If a tool has a button that verifies the key by listing models, it will call GET /v1/models, which this API supports.
Features that depend on a vendor-specific model, such as a built-in agent that only works with one named model, may not behave as expected. Test the one feature you care about before you commit a team to it.
Tool calling and JSON mode
Two features decide whether a model can sit inside a real application: structured output and function calls. Both are supported. Tool calling accepts tools and tool_choice, streams tool_calls, and takes results back as messages with role: "tool". JSON mode is switched on with response_format: {"type": "json_object"}.
import json, os
from openai import OpenAI
client = OpenAI(
base_url="https://api.openrouteruncensored.cc/v1",
api_key=os.environ["API_KEY"],
)
tools = [{
"type": "function",
"function": {
"name": "get_order_status",
"description": "Look up an order by id",
"parameters": {
"type": "object",
"properties": {"order_id": {"type": "string"}},
"required": ["order_id"],
},
},
}]
messages = [{"role": "user", "content": "Where is order A-1042?"}]
first = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
call = first.choices[0].message.tool_calls[0]
result = {"order_id": json.loads(call.function.arguments)["order_id"], "status": "shipped"}
messages.append(first.choices[0].message)
messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})
final = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
print(final.choices[0].message.content)
The loop is the standard one: the model asks for a call, your code runs it, you send the result back. In production, handle the case where the model returns no tool call, and validate the arguments before you run anything. With JSON mode, still validate the output against a schema. A model asked for JSON usually returns valid JSON, but your parser should have a fallback for the rare miss.
The other parameters you expect are passed through too: temperature, top_p, stop, seed and the frequency and presence penalties.
Limits, errors and cost control
A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 concurrent and 60 per minute. Over a limit you receive HTTP 429 with the error code rate_limited (requests per minute) or concurrency (too many at once). Temporary overload also returns 429, with a Retry-After: 5 header. Log the X-Request-Id response header with each call so you can trace a bad request later, and read X-Balance-USD to track your remaining credit.
The context window is 100,000 tokens for prompt and completion together, and the request body can be up to 8 MB. Failed or refused requests are not charged.
Costs are easy to model. At $0.15 per 1M input tokens and $0.50 per 1M output tokens, a call with 2,000 tokens in and 500 out costs $0.0003 plus $0.00025, which is $0.00055. A thousand such calls come to $0.55. Top-ups are any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200. You can pay by in crypto (USDT on TRC20, USDC on Base). Credit does not expire. Full tables are on the pricing page.
A short checklist before you ship
Most integration bugs are small and repeat across projects. Run through these before real users touch the feature.
- Verify the key with the models call.
GET /v1/modelswith your bearer header should return a list that includesuncensored. A 401 usually means the key is wrong or missing theBearerprefix. - Check the path. The base URL already ends in
/v1. If your client appends/v1a second time, you will probably see a 404. Most SDKs add only/chat/completions. - Set a timeout that fits streaming. A long completion can run for a while. Use a read timeout that applies between chunks rather than to the whole response.
- Cap concurrency in your own code. A semaphore sized to 8 for a full key avoids
concurrencyerrors before they happen. Keep it at 2 on a trial key. - Retry 429 with a delay. Wait the
Retry-Aftervalue when it is present, and add jitter so parallel workers do not retry in lockstep. - Write your own content rules. A model with relaxed refusals does not know your product's boundaries. Put them in the system prompt, and filter output before you publish it anywhere public.
- Log usage per request. Store
usage.prompt_tokensandusage.completion_tokensnext to the request id. That gives you real averages instead of guesses when you plan a top-up.
A request log built this way also answers the question a finance person will ask in the first month: which feature spends the money. With per-feature token counts, the cost formulas above turn into a dashboard in an afternoon.
When a router is the better choice
Be honest about the trade. Pick a router when you need to compare many models in one codebase, when your product must fall back from one vendor to another during an outage, or when you need capabilities outside text. Pick this endpoint when a single predictable model with relaxed refusals is the point, and when you want flat, prepaid, per-token billing without a subscription.
Many teams use both. They keep a router for general work and send the narrow set of prompts that others refuse to this endpoint. Because both speak the OpenAI format, the switch is a client configuration, not a rewrite. The docs list every supported parameter and show a first request in a few minutes. Prompts sent to the API are not used for training.
