OpenUncensored

Общайтесь с 58 нецензурированными и аблитерированными LLM с открытыми весами, сравнивайте рейтинги моделей и проверяйте баланс из любого MCP-клиента. Удалённый сервер с входом через OAuth.

Размещённый MCP-сервер

npx add-mcp 'https://openuncensored.com/mcp/connect'

Устанавливается в Claude Code, Codex, Cursor и другие

Документация

One API for every uncensored model.

OpenUncensored speaks the OpenAI chat completions protocol. Point any OpenAI SDK at our base URL, pick a model id from the catalogue, and the router picks the provider.

Base URLhttps://api.openuncensored.com/v1Live

Cheapest & fastest DeepSeek V4.1 Flash ($0.28 / $0.007 cached / $1.12)

Call deepseek-v4.1-flash-1017-uncensored (or shorthand alias deepseek) at $0.28 in / $0.007 cached / $1.12 out per 1M tokens — 270+ tok/s live on our own GPUs, 1M context, native tool calling and image input, plus a -thinking variant for reasoning.Read benchmarks & pricing →

Start here

Up and running in a minute.

  1. 01 Get a key Buy credits and copy the ou- key. No account. Agents can buy one themselves through the checkout API.
  2. 02 Pick a model Browse models and copy its id. Check its refusal fingerprint and loop rate first.
  3. 03 Send a request Set the base URL to https://api.openuncensored.com/v1; any OpenAI SDK works. Add a routing object when you care which provider serves it.
curl https://api.openuncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $OU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017-uncensored",
    "messages": [{"role": "user", "content": "Explain how SQL injection works."}],
    "routing": {"strategy": "quality"}
  }'

Older base URL

https://openuncensored.com/api/v1 still works, but it goes through the website, which ends a request that has sent nothing for 120 seconds. Streams are fine there; a long non-streamed answer or a slow image is not. On https://api.openuncensored.com/v1 an image request may take up to 4 minutes.

Security

Keys and auth.

Send your key as a bearer token: Authorization: Bearer <key>. A missing or wrong key returns 401 with code invalid_api_key.

Hosted keys start with ou- and come from the credits page. Each key carries a prepaid USD balance. It is shown once, and we store only its SHA-256 hash. Buy more credits for the same key by ticking “Add to a key I already have”.

Optionally name your app with an X-Title header (or HTTP-Referer), the OpenRouter convention. Cline, Roo, Kilo Code and others already send it. It only labels your traffic in our stats.

On a self hosted router, OU_API_KEY holds the accepted keys (comma separated for several). Keys are compared in constant time. If OU_API_KEY is unset the router runs open, which is only safe on localhost: anyone who can reach the port can spend your provider keys.

Browser use

The router only accepts browser requests from origins listed in OU_CORS_ORIGINS (default: pages served from localhost). Never ship a server key inside client side code.

POST /v1/chat/completions

Chat completions.

Fully OpenAI compatible, streaming and non streaming. Samplers outside the OpenAI spec such as top_k, min_p and repetition_penalty are forwarded to the provider untouched, because those matter for the models this router serves.

FieldTypeDescription
modelstringA model id from GET /v1/models. Required.
messagesarrayChat messages, at least one. Tool calls and tool results pass through.
streambooleanServer sent events when true. Default false.
temperature, top_p, max_tokensnumberStandard sampling controls.
tools, tool_choicearray, objectOpenAI tool calling. Providers flagged as tool capable are tried first.
response_format, seed, stopvariousForwarded as is.
routingobjectRouter extension. See routing.

Response

The upstream body, plus usage when the provider left it out (marked usage_estimated) and an ou object describing how the request was served. model, ou.model and every stream chunk always name the model you requested. The same facts arrive as headers: X-Request-ID, X-OU-Model, X-OU-Provider, X-OU-Strategy, X-OU-Attempts and X-OU-Latency-Ms.

{
  "id": "chatcmpl-8f2c",
  "object": "chat.completion",
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "choices": [
    {"index": 0, "message": {"role": "assistant", "content": "SQL injection happens when…"}, "finish_reason": "stop"}
  ],
  "usage": {"prompt_tokens": 18, "completion_tokens": 412, "total_tokens": 430},
  "ou": {
    "request_id": "req_4f1c09a2b7d34e81c0aa",
    "provider": "openuncensored",
    "model": "deepseek-v4.1-flash-1017-uncensored",
    "strategy": "quality",
    "latency_ms": 1240.6,
    "usage_estimated": false,
    "attempts": [
      {"provider": "openuncensored", "outcome": "ok", "status_code": 200, "latency_ms": 1240.6}
    ]
  }
}

POST /v1/responses

Responses API.

The OpenAI Responses API, for clients that only speak it, such as the Codex CLI and the OpenAI Agents SDK. Every model works here: the router translates the request to chat completions, routes, bills and falls back exactly as above, and translates the answer back, streaming included.

FieldTypeDescription
modelstringA model id from GET /v1/models. Required.
inputstring or arrayA prompt, or message, function_call and function_call_output items.
instructionsstringSystem prompt.
streambooleanResponses events: response.created, output item and text deltas, response.completed.
tools, tool_choicearray, objectFunction and custom (free form) tools. Hosted tools such as web search are not available and are ignored.
max_output_tokens, temperature, top_pnumberStandard sampling controls.
routingobjectRouter extension, same as for chat. See routing.

Stateless

Nothing is stored. Send the whole conversation in input each turn; previous_response_id and store are not supported. Model reasoning comes back as reasoning output items.

curl https://api.openuncensored.com/v1/responses \
  -H "Authorization: Bearer $OU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017-uncensored",
    "instructions": "You are a terse assistant.",
    "input": "Explain how SQL injection works."
  }'

POST /v1/messages

Anthropic Messages API.

The Anthropic Messages API, for Claude Code, the Anthropic SDKs and other clients that speak it. Every model works here too: the request is translated to chat completions, routed, billed and falls back as above, and the answer comes back in Anthropic's format, streaming included. The base URL for Anthropic clients is https://api.openuncensored.com (they add /v1/messages themselves). Send the key as x-api-key or Authorization: Bearer.

FieldTypeDescription
modelstringA model id from GET /v1/models. Required. Claude model names are not served.
messages, systemarray, string or blocksText, image and tool_result blocks. Pictures returned by tools reach vision models.
max_tokensintegerOutput limit, as in Anthropic's API.
streambooleanAnthropic events: message_start, content block deltas, message_delta with usage, message_stop.
tools, tool_choicearray, objectClient tools with input_schema. Server tools that Anthropic runs, such as web search, are ignored.
thinkingobjectWhen enabled, the model's reasoning comes back as thinking blocks. The model's own default reasoning applies either way.
temperature, top_p, stop_sequencesnumber, arrayStandard sampling controls.
routingobjectRouter extension, same as for chat. See routing.

Prompt caching is automatic

No cache_control markers needed (they are accepted and ignored). Providers cache the shared start of your prompts on their own, and the cached part comes back as cache_read_input_tokens, billed at the provider's cached price. POST /v1/messages/count_tokens returns an estimate (about 4 characters per token) and is free.

curl https://api.openuncensored.com/v1/messages \
  -H "x-api-key: $OU_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017-uncensored",
    "max_tokens": 1024,
    "system": "You are a terse assistant.",
    "messages": [{"role": "user", "content": "Explain how SQL injection works."}]
  }'

POST /v1/images/generations

Uncensored images.

OpenAI compatible image generation, so client.images.generate works unchanged. Anything involving minors, real people without consent or non consensual imagery is strictly prohibited, and providers refuse it. Each model is routed to its cheapest provider with automatic fallback, and billed per image from the same credits as text.

FieldTypeDescription
modelstringAn id from the table below or GET /v1/images/models. Required.
promptstringWhat to draw. Up to 8000 characters; some image models (such as Z-Image, Chroma, Qwen Image) take up to 1500.
nintegerImages to make, 1 to 4. Default 1. Each is billed.
sizestring1024x1024 (default), 1024x1536, 1536x1024, 1024x1792, 1792x1024, 512x512 or auto.
response_formatstringb64_json (default) or url, which returns a data: URL. Nothing is stored on our side.
ModelPer imageWhat it is
z-image-turbo$0.01Fast photorealistic model from Alibaba Tongyi (Apache 2.0). Good default.
chroma$0.01Uncensored FLUX.1-schnell derivative (Apache 2.0), strong at prompt following.
qwen-image$0.03Alibaba's Qwen-Image (Apache 2.0). Best text rendering inside images.
qwen-image-3-uncensored$0.04Uncensored Qwen Image 3, high detail at 1K and 2K.
hidream-o1-dev$0.02HiDream's fast 2K model.

The response is the OpenAI shape, data[].b64_json, plus an ou object with the provider used. Prices are for the cheapest route; a fallback provider can cost a little more.

curl https://api.openuncensored.com/v1/images/generations \
  -H "Authorization: Bearer $OU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "z-image-turbo", "prompt": "a red fox in fresh snow, photo", "size": "1024x1024"}' \
  | jq -r '.data[0].b64_json' | base64 --decode > fox.png

POST /v1/images/edits

Edit images, keep your characters.

Send one or more reference images plus an instruction, and the model draws a new image that keeps them: the same character, face and outfit in a new scene, pose or style. It is OpenAI's edit endpoint, so client.images.edit works unchanged, and it bills per image from the same credits. qwen-image-3-edit gives the best edits and is the one we recommend; qwen-edit-uncensored is the fallback for edits it refuses. The same rules as image generation apply.

FieldTypeDescription
modelstringAn editing model below.
promptstringWhat to make from the references. Name what must stay the same.
image / image[]fileMultipart uploads like OpenAI: PNG, JPEG, WebP or GIF, up to 20 MB each.
imagesstring[]In a JSON body instead: data URLs, base64 strings or public https links.
n, size, response_formatAs for image generation.
Editing modelPer imageReferences and what it is
qwen-edit-uncensored$0.04up to 3 · Uncensored Qwen Image Edit. Keeps a character from up to 3 reference images in new scenes.
seedream-v5-5-edit$0.0255 + $0.0102 eachup to 10 · ByteDance Seedream 5.5 editing. Strongest at keeping one character consistent across up to 10 reference images.
qwen-image-3-edit$0.04 + $0.00345 eachup to 3 · Qwen Image 3 editing at 1K and 2K, high detail; up to 3 reference images.
curl https://api.openuncensored.com/v1/images/edits \
  -H "Authorization: Bearer $OU_API_KEY" \
  -F model=qwen-image-3-edit \
  -F "image[]=@knight.png" \
  -F prompt="The same knight, same face and armour, now riding a horse across a snowy battlefield" \
  | jq -r '.data[0].b64_json' | base64 --decode > knight-horse.png

POST /v1/videos

Images into video.

Image to video: send one image, which becomes the first frame, and a prompt saying what happens, and the model animates it into a short clip. The endpoints follow OpenAI's Videos API, so client.videos.create, retrieve and download_content in the OpenAI Python SDK work unchanged. Jobs are asynchronous: create one, poll it until it completes, then download the MP4. Credit is checked when the job is created, and the clip is charged only when it completes; a failed clip costs nothing. Finished clips are kept for 7 days.

FieldTypeDescription
modelstringAn id from the table below or GET /v1/videos/models. Required.
promptstringWhat happens in the clip. Up to 4000 characters. Required.
imagestringThe first frame: a data URL, a base64 string or a public https link. Required. input_reference and image_url are accepted as aliases.
input_referencefileIn a multipart/form-data body instead: the image as a file upload, up to 20 MB. The other fields keep the same names.
secondsinteger or stringClip length, one of the model's seconds, such as 5 or "5". Default: the model's default_seconds.
resolutionstringOne of the model's resolutions, such as 720p. A size such as 1280x720 is accepted too and matched by its shorter side. Default: the model's default_resolution.
Video modelPer clipLength, audio and what it is
minimax-h3-chili-image-to-video$0.174 to 15 s · with audio · Animates an image into a 4 to 15 second clip at 768p with sound. The fastest and best at following the prompt.
wan-2.2-enhanced-image-to-video$0.405 or 8 s · no audio · Animates an image into a 5 or 8 second clip at up to 720p, without sound. An uncensored version of Alibaba's Wan 2.2.
ovi-image-to-video$0.225 s · with audio · Animates an image into a 5 second clip with sound. Character.AI's open audio and video model, based on Wan.

The price is for the model's default length and resolution. GET /v1/videos/models lists every model's seconds, resolutions, audio, the price of each length and resolution in prices, and typical_wait_s, the usual time from create to completed (35 to 70 s for MiniMax H3 Chili, 50 to 70 s for Wan 2.2 Enhanced, 2 to 4 min for Ovi).

EndpointKeyReturns
POST /v1/videosyesA Video object with status queued.
GET /v1/videos/{id}yesThe Video object. Poll every 5 to 10 seconds until status is completed or failed.
GET /v1/videos/{id}/contentyesThe MP4 (video/mp4). 409 video_not_ready before it completes, 410 video_expired after 7 days.
GET /v1/videosyesYour videos, newest first. ?limit=20.
GET /v1/videos/modelsnoVideo models with their lengths, resolutions, audio and prices.

A Video object has id, model, status (queued, in_progress, completed or failed), progress from 0 to 100, seconds, size once it completes, error when it fails, and created_at, completed_at and expires_at in Unix seconds. Its ou object carries price_usd, audio and, once the clip completes, download_url: a direct link to the MP4, valid for one hour. Only the account that created a video can read it.

# 1. Create the job: the image is the first frame
curl https://api.openuncensored.com/v1/videos \
  -H "Authorization: Bearer $OU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "minimax-h3-chili-image-to-video", "prompt": "She turns and smiles as the rain falls; the camera pushes in.",
       "image": "https://example.com/street.jpg", "seconds": 5}'
# -> {"id": "video_...", "object": "video", "status": "queued", ...}

# 2. Poll every 5 to 10 seconds until "status" is "completed" or "failed"
curl https://api.openuncensored.com/v1/videos/video_abc -H "Authorization: Bearer $OU_API_KEY"

# 3. Download the MP4
curl -o clip.mp4 https://api.openuncensored.com/v1/videos/video_abc/content -H "Authorization: Bearer $OU_API_KEY"

GET /v1/models

The catalogue.

EndpointQueryReturns
GET /v1/models?available=trueEvery model with its providers and eval scores. The flag hides models no healthy, configured provider can serve right now.
GET /v1/models/{id}noneOne model with per provider live metrics, pricing, rate limits and circuit breaker state.
GET /v1/stats/latency?days=7Live speed on real traffic per model and provider: p50 and p90 latency, time to first token, tokens per second, success rate. Only pairs with at least 5 successful requests. No key needed.
GET /api/rankings.jsonnoneThe OpenUncensored Score for every model, with its parts (intelligence, agentic, non-refusal, drift) and weights. Served from the site (https://openuncensored.com/api/rankings.json), not the API base URL. No key needed.
GET /metricsnoneTTFT, tokens per second, latency percentiles and error rate over the rolling window, plus lifetime tokens and cost.
GET /health?deep=trueLiveness and provider status (ok, degraded, unavailable). Deep probes every configured upstream and needs a key.
GET https://api.openuncensored.com/v1/models/deepseek-v4.1-flash-1017-uncensored

{
  "id": "deepseek-v4.1-flash-1017-uncensored",
  "object": "model",
  "owned_by": "deepseek",
  "base_model": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
  "abliteration_method": "finetune",
  "modality": "text",
  "context_length": 1048576,
  "pricing": {"prompt": "0.00000028", "completion": "0.00000112"},
  "available": true,
  "providers": [
    {"name": "openuncensored", "status": "online", "configured": true,
     "pricing": {"input_per_mtok": 0.28, "output_per_mtok": 1.12, "cache_read_per_mtok": 0.007}}
  ]
}

GET /v1/credits

Credits and balance.

The prepaid balance of the key you send. Usage is charged at exactly the provider's per token price, with no markup, and settles every 30 seconds, so a request in flight can take the balance slightly below zero. At zero the API answers 402 with code insufficient_quota and a link to top up.

curl https://api.openuncensored.com/v1/credits -H "Authorization: Bearer $OU_API_KEY"

{"object": "credits", "data": {"remaining_usd": 4.18, "balance_usd": 4.2,
  "pending_usage_usd": 0.02, "currency": "usd",
  "top_up_url": "https://openuncensored.com/credits"}}

A key runs at most 32 requests at once, and each running request reserves its likely cost until it finishes, so parallel calls cannot spend more than the balance. Past the limit the API answers 429 with code concurrency_limit; retry after a second.

POST /api/agent/checkout

Buy credits by API.

For agents buying on their human's behalf: the agent gets a Stripe payment link to hand over, then polls for the key. The key goes only to whoever holds the claim token, never to the payment page. These endpoints live on the site (https://openuncensored.com/api/...), not under the API base URL.

EndpointBody or headerReturns
POST /api/agent/checkout{"credits": 1000, "key"?: "ou-..."}credits is in US cents (500 to 100000). Send key to top up an existing key. Returns payment_url, session_id, claim_token and next_steps.
GET /api/agent/checkout/{session_id}Authorization: Bearer <claim_token>status is pending, expired or paid. When paid, api_key holds the new key exactly once, with balance_cents and base_url. Poll every 5 seconds.
curl -X POST https://openuncensored.com/api/agent/checkout \
  -H "Content-Type: application/json" -d '{"credits": 1000}'
# give payment_url to your human, then poll:
curl https://openuncensored.com/api/agent/checkout/$SESSION_ID \
  -H "Authorization: Bearer $CLAIM_TOKEN"

POST /api/feedback

Tell us what to fix.

Feedback from people or their agents: bugs, missing models, pricing, docs. No key needed, and a human reads every submission. Send JSON, or plain text as the whole body. A few submissions a minute per address at most.

FieldTypeDescription
messagestringWhat should we improve? Required, up to 5000 characters.
categorystringOne of bug, model_request, pricing, docs, agent_experience, feature, other.
contactstringEmail or handle if you want a reply.
model, agentstringThe model it is about, and the agent or tool sending it.
api_keystringOptional ou- key (or Authorization: Bearer) to link it to your account.
curl -X POST https://openuncensored.com/api/feedback \
  -H "Content-Type: application/json" \
  -d '{"message": "Add Kimi K3 uncensored", "category": "model_request", "agent": "claude-code"}'

{"ok": true, "id": "fb_...", "thanks": "Thanks. A human reads every submission."}

MCP and markdown

Built for agents.

An agent can use the whole site without a browser. Give it openuncensored.com/agents.md: how to buy a key, call the API and recover from errors, in one page.

ResourceTypeWhat it is
/mcpMCP, streamable HTTPAn MCP server with tools list_models, get_rankings, get_model, buy_credits, check_purchase, check_balance, chat, generate_image, create_video, get_video, send_feedback and get_guide.
/mcp/connectMCP, OAuth sign inThe connector for Claude, ChatGPT, Cursor and other MCP apps: add the URL, sign in by pasting your key once, and the app gets list_models, get_rankings, get_model, chat, generate_image, create_video, get_video, check_balance and send_feedback.
/agents.mdmarkdownThe agent guide: fastest path from nothing to a working call.
/llms.txt, /llms-full.txttextIndex of the site for language models, and the full docs in one file.
/<page>.mdmarkdownAny page as markdown, for example /docs.md, /uncensored-llm-leaderboard.md, /models/<id>.md.
Claude: Settings > Connectors > Add custom connector
ChatGPT: Settings > Apps > Advanced settings > Developer mode > Create app

URL: https://openuncensored.com/mcp/connect
Then sign in with your API key when asked.

SDKs and coding agents

Plug it in anywhere.

Anything that speaks the OpenAI API works: set the base URL to https://api.openuncensored.com/v1 and use your key. The snippets below use OPENUNCENSORED_API_KEY for the key. Chat completions carry tools, streaming, JSON schema output and reasoning_effort; clients that only speak the Responses API, such as Codex, use /v1/responses, and Anthropic clients such as Claude Code use /v1/messages.

// npm i ai @ai-sdk/openai-compatible zod
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText, streamText, tool, stepCountIs } from "ai";
import { z } from "zod";

const openUncensored = createOpenAICompatible({
  name: "openuncensored",
  apiKey: process.env.OPENUNCENSORED_API_KEY,
  baseURL: "https://api.openuncensored.com/v1",
  includeUsage: true, // usage at the end of streams
  supportsStructuredOutputs: true, // Output.object sends a JSON schema
});

const { text } = await generateText({
  model: openUncensored("deepseek-v4.1-flash-1017-uncensored"),
  prompt: "Explain how a lock pick works in one sentence.",
});

// Streaming
const result = streamText({
  model: openUncensored("deepseek-v4.1-flash-1017-uncensored"),
  prompt: "Count from 1 to 5.",
});
for await (const part of result.textStream) process.stdout.write(part);

// Tools, several steps
const { text: answer } = await generateText({
  model: openUncensored("deepseek-v4.1-flash-1017-uncensored"),
  tools: {
    weather: tool({
      description: "Get the weather in a city",
      inputSchema: z.object({ city: z.string() }),
      execute: async ({ city }) => ({ city, temperatureC: 18 }),
    }),
  },
  stopWhen: stepCountIs(3),
  prompt: "What is the weather in Paris?",
});

// Reasoning effort, for models that reason
await generateText({
  model: openUncensored("deepseek-v4.1-flash-1017-uncensored-thinking"),
  prompt: "Is 91 prime?",
  providerOptions: { openuncensored: { reasoningEffort: "high" } },
});

Claude Code, Codex and OpenCode in one go: curl -fsSL https://openuncensored.com/setup.sh | sh. It asks before each change, keeps backups, and adds claude-uncensored, codex-uncensored and opencode-uncensored instead of changing your defaults (read the script).

Step-by-step guides: Claude Code and Codex, OpenCode, Cline, Roo Code, Kilo Code and Cursor, SillyTavern and RisuAI.

Router extension

Routing strategies.

Each model is served by one or more providers, each with its own price and speed. The router ranks them with a strategy, tries them in order and falls back to the next one when a provider fails before the first streamed byte. Hosts that run the model themselves always go before resellers; the strategy orders providers within each group. Pick the strategy, in order of precedence, with the routing body field, the X-OU-Strategy header, OpenRouter's provider.sort (price, throughput or latency), or a default for your key on the credits page. Without any of these the strategy is default.

Three choices cover most uses. auto (the default) takes the cheapest provider among those producing at least 100 tokens per second. cheapest always takes the cheapest provider for the request, even a slow one. fastest takes the provider producing the most tokens per second, whatever it costs. For example, send "routing": {"strategy": "cheapest"} in the body or the header X-OU-Strategy: fastest, or set a default once for your key on the credits page so every request uses it without any code change.

StrategyRanks byNotes
defaultprice above 100 tok/sAliases auto, quality. Providers averaging at least 100 output tokens per second (or not measured yet) go first, cheapest first; slower ones follow, best eval score first.
speedlive latencyAlias latency. Lowest average time to first token for streams, total latency otherwise.
throughputlive tokens/sAlias fastest. Highest average output tokens per second. For long answers and batch jobs.
costpriceAliases cheapest, price. Cheapest for this prompt plus max_tokens (512 assumed when unset), counting the share of prompt tokens the model usually gets as cache hits.
randomnothingShuffled. Useful for spreading load or A/B tests.
FieldTypeDescription
routing.strategystringdefault, speed, throughput, cost or random (aliases auto, quality, fastest, latency, cheapest, price).
routing.onlystring[]Only try these providers.
routing.ignorestring[]Never try these providers. This is how you exclude a host today.
routing.allow_fallbacksbooleanFalse: never answer with another model. The model's other providers are still tried when one fails. Default true.
{
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "messages": [{"role": "user", "content": "…"}],
  "routing": {
    "strategy": "cost",
    "only": ["venice", "nanogpt"],
    "ignore": ["openrouter"],
    "allow_fallbacks": true
  }
}

What you are billed. The price of the provider that answered, with no markup. The response names it in ou.provider and the X-OU-Provider header, and X-OU-Strategy echoes the strategy used. Things to know:

  • Cached input (prompt tokens a provider has seen recently) is priced very differently from host to host. Each model's providers list in /v1/models/{id} has every provider's input_per_mtok, output_per_mtok and cache_read_per_mtok (null when the provider doesn't publish one), plus live tokens_per_second and time_to_first_token_ms.
  • The top level pricing of a model is the cheapest provider's list price, not a promise for every request.
  • Speeds are rolling averages over recent requests and move through the day.
  • Changing provider partway through a conversation loses that provider's prompt cache, so the next few requests can be fully priced.
  • A fallback is billed at the fallback provider's price. List the providers you accept in only to get the error instead.
  • When a provider reports its own charge, that is what you pay; otherwise we compute it from its listed prices.

Providers that fail three times in a row go offline for 60 seconds (OU_BREAKER_THRESHOLD, OU_BREAKER_COOLDOWN). An upstream 429 cools that provider down for its Retry-After, or 30 seconds when none is given. Requests the upstream rejects as invalid (400, 413, 422) are relayed and never retried.

Coming next

Route by what it refuses.

Planned

The same model can behave differently on different hosts: a platform system prompt, a moderation classifier or an aggressive quantisation all change what comes back. These filters will route only to model and provider pairs whose measured behaviour meets your bar.

FieldTypeDescription
routing.require_openPlannedstring[]Categories that must stay open. One of cyber bio chem weapons drugs violence hate selfharm privacy fraud political.
routing.max_refusalPlannednumberHighest refusal rate allowed in each required category, 0 to 1.
routing.max_loop_ratePlannednumberSkip pairs whose agentic doom loop rate is above this, 0 to 1.
routing.no_loggingPlannedbooleanOnly providers that state they keep no prompt or completion logs.
{
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "messages": [{"role": "user", "content": "…"}],
  "routing": {
    "strategy": "quality",
    "ignore": ["openrouter"],
    "require_open": ["cyber", "bio"],
    "max_refusal": 0.05,
    "max_loop_rate": 0.2,
    "no_logging": true
  }
}

Today

Exclusion by provider already works with routing.ignore and routing.only. Per category numbers live on each model page.

stream: true

Streaming responses.

Streams are server sent events in the OpenAI chunk format, ending with data: [DONE]. Fallback to another provider only happens before the first byte reaches you. After that, an upstream failure arrives in band as an OpenAI style error event so your client can surface it. The router tolerates up to 60 seconds of silence mid stream (OU_STREAM_TIMEOUT).

data: {"id":"chatcmpl-8f2c","choices":[{"index":0,"delta":{"content":"SQL"}}]}

data: {"id":"chatcmpl-8f2c","choices":[{"index":0,"delta":{"content":" injection"}}]}

data: {"error": {"message": "upstream closed the connection", "type": "upstream_error", "param": null, "code": null}}

data: [DONE]

OpenAI error format

When things go wrong.

Every error uses OpenAI's shape: {"error": {"message", "type", "param", "code", "metadata"}}. metadata carries per provider details, such as why each one was skipped.

StatusCodeWhen
400invalid_requestThe body failed validation.
400invalid_routing_optionsUnknown strategy or provider, or only/ignore exclude every provider.
401invalid_api_keyMissing or wrong bearer token.
404model_not_foundNo model with that id.
400invalid_sizeImage size not in the supported list.
400invalid_imageAn edit reference image is missing, not a PNG, JPEG, WebP or GIF, over 20 MB, or not a data URL, base64 string or https link. On /v1/videos: the input image could not be read.
400too_many_imagesMore reference images than the model takes (max_input_images in GET /v1/images/models).
400model_cannot_editThe model does not edit images. The message lists the editing models.
400edit_only_modelAn editing model sent to /v1/images/generations. Send reference images to /v1/images/edits.
400missing_imageA video request without an image. Every video model needs one, the first frame.
400image_too_largeThe video input image is over 20 MB.
400invalid_secondsseconds is not one of the model's lengths (seconds in GET /v1/videos/models).
400invalid_resolutionresolution or size does not match one of the model's resolutions.
400prompt_too_longA video prompt over 4000 characters.
402insufficient_creditNot enough credit for the clip. Top up and create the job again.
404video_not_foundNo video with that id on this account.
409video_not_readyThe clip has not completed yet. Poll GET /v1/videos/{id} first.
410video_expiredThe clip was deleted after 7 days.
502upstream_errorThe video provider would not queue the job. Nothing is charged.
4xxupstream_rejected_requestThe provider rejected the request itself. Relayed as is, never retried.
429rate_limit_exceededEvery provider for the model is rate limited. Honour Retry-After.
502all_providers_failedEach provider was tried and failed.
503no_provider_availableEvery provider is unconfigured or offline.
503not_readyThe router is still starting up.
500internal_errorA router bug. Check the router logs.

MIT licensed

Run it yourself.

The router is a FastAPI app. Bring your own provider keys, they are read from the environment variables named by api_key_env in configs/providers.yaml.

git clone https://github.com/DhruvAtreja/open-uncensored
cd open-uncensored
pip install -e .

# provider keys, named by api_key_env in configs/providers.yaml
export FEATHERLESS_API_KEY=…
export VENICE_API_KEY=…
export OPENROUTER_API_KEY=…

# require a bearer token before exposing the port
export OU_API_KEY=$(openssl rand -hex 24)
export OU_CORS_ORIGINS=https://openuncensored.com

ou-router --host 0.0.0.0 --port 8080
VariableDefaultPurpose
OU_API_KEYunsetAccepted bearer tokens, comma separated. Unset means open, local use only.
OU_HOST, OU_PORT127.0.0.1:8080Bind address. Also --host and --port.
OU_ROUTING_STRATEGYqualityServer default strategy: quality, speed, throughput, cost or random.
OU_CORS_ORIGINSlocalhostOrigins allowed to call the API from a browser, or *.
OU_REQUEST_TIMEOUT300Non streaming upstream timeout, seconds.
OU_STREAM_TIMEOUT60Longest silence tolerated while streaming, seconds.
OU_CONNECT_TIMEOUT10Upstream connect timeout, seconds.
OU_METRICS_WINDOW100Requests per rolling metrics window.
OU_BREAKER_THRESHOLD3Consecutive failures that take a provider offline.
OU_BREAKER_COOLDOWN60Seconds a provider stays offline.
OU_HEALTH_INTERVAL0Seconds between active health checks. 0 is off.
OU_LOG_LEVELINFOAlso --log-level. --reload restarts on code changes.
OU_PROVIDERS_CONFIG, OU_MODELS_CONFIGconfigs/Alternative YAML files.

In models.yaml each model can carry upstream_ids (the name a provider expects), pricing, eval_scores and provider_eval_scores for hosts whose quantisation changes quality.

ou-eval

Run the evals yourself.

Every number on this site comes from the same harness you can run locally. Five benchmarks: capability, agentic, tool_call, refusal and divergence. Results land in results/{model}/{provider}/{timestamp}.json. Responses to harmful probes are scored and discarded, never written to disk.

# run every benchmark against one model on one provider
ou-eval --model venice-uncensored --provider openrouter \
  --api-model cognitivecomputations/dolphin-mistral-24b-venice-edition \
  --benchmarks all --trials 2

# compare against a live base model run
ou-eval --model huihui-qwen3.5-27b-abliterated --provider featherless \
  --base-model Qwen/Qwen3.5-27B --base-provider featherless

# fold every results/ file into leaderboard.json
cd src && python -m eval.report --output ../leaderboard/leaderboard.json
FlagDefaultPurpose
--model / --providerrequiredModel id and provider name from configs/.
--benchmarksallComma separated subset.
--api-model--modelModel name the provider expects, when it differs.
--base-url, --api-key-envconfigPoint at an ad hoc endpoint.
--base-model, --base-providermodels.yamlRun the base model live for retention and divergence.
--base-accuracynoneKnown base capability accuracy, skips the live base run.
--trials2Agentic runs per scenario, 1 to 20.
--tool-modeautotext (JSON in prompt), native (tools parameter) or auto.
--limitallOnly the first N items per benchmark.
--concurrency, --rpm4, providerParallel requests and requests per minute.
--timeout, --retries180, 3Per request timeout and retries with backoff.
--temperature, --max-tokensper benchOverride sampling. Raise max tokens for reasoning models.
--results-dir, --no-save./resultsWhere results go, or skip writing them.

How each score is computed is on the methodology page.