cd /news/ai-tools/use-uncensored-models-on-opencode-co… · home › topics › ai-tools › article
[ARTICLE · art-168078] src=openuncensored.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Use Uncensored Models on OpenCode, Codex, and Claude Code

OpenUncensored, an OpenAI-compatible API offering 82 uncensored models (60 text and 22 image), published setup instructions for routing coding agents such as OpenCode, Codex CLI, Cursor, Cline, Kilo Code, Roo Code and Claude Code to its endpoint at https://openuncensored.com/api/v1 using an "ou-" API key that requires no account or sign-up. The guide recommends deepseek-v4.1-flash-1017-uncensored for agent and coding work, citing its top ranking and prompt-cache savings on long sessions, and documents configuration for each tool, including a Codex config.toml provider block using the Responses API and an MCP server that lets Claude Code list models, read rankings, check balances and send prompts. OpenCode 2 users who see a missing-key error after exporting it are told to add --standalone so the background service reads the current shell's environment.

read3 min views7 publishedNov 12, 2026

OpenUncensored is an OpenAI compatible API, so any tool that lets you set a custom OpenAI base URL can use its 82 uncensored models (60 text and 22 image). You need two things:

Pick a model id from the rankings or GET https://openuncensored.com/api/v1/models. For agent and coding work, start with deepseek-v4.1-flash-1017-uncensored: it is at the top of the rankings, fast, and cheap on long agent sessions because most of each request is served from the prompt cache.

Let your agent set it up #

The fastest way: paste this into Claude Code, Cursor, Codex, OpenCode or any agent:

Read https://openuncensored.com/agents.md and set me up with an OpenUncensored key.

The guide tells the agent how to start a purchase, hand you the payment link, and collect the key itself.

Cline, Kilo Code and Roo Code #

In the extension's settings, choose the OpenAI Compatible provider, then set:

  • Base URL: https://openuncensored.com/api/v1
  • API key: your ou- key
  • Model ID: for example deepseek-v4.1-flash-1017-uncensored

Cursor #

In Cursor's model settings, enter your ou- key as the OpenAI API key, turn on the option to override the OpenAI base URL and set it to https://openuncensored.com/api/v1, then add the model id (for example deepseek-v4.1-flash-1017-uncensored) as a custom model.

Codex CLI #

Add a provider to ~/.codex/config.toml:

[model_providers.openuncensored]
name = "OpenUncensored"
base_url = "https://openuncensored.com/api/v1"
env_key = "OU_API_KEY"
wire_api = "responses"

[profiles.uncensored]
model_provider = "openuncensored"
model = "deepseek-v4.1-flash-1017-uncensored"

Then export OU_API_KEY=ou-... and run codex --profile uncensored. Codex speaks the OpenAI Responses API, which OpenUncensored serves at /api/v1/responses, so file edits, shell commands and multi-step tasks work as usual.

OpenCode #

Add OpenUncensored as a provider in opencode.json, either in your project or in ~/.config/opencode/opencode.json for every project:

{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "openuncensored": {
      "name": "OpenUncensored",
      "env": ["OPENUNCENSORED_API_KEY"],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": { "baseURL": "https://openuncensored.com/api/v1" },
      "models": {
        "deepseek-v4.1-flash-1017-uncensored": { "name": "DeepSeek V4.1 Flash 1017 Uncensored" }
      }
    }
  }
}

Add any other model id from the rankings to models the same way. Then export OPENUNCENSORED_API_KEY=ou-... and pick the model with /models in OpenCode, or run it directly:

opencode run -m openuncensored/deepseek-v4.1-flash-1017-uncensored "Explain how SQL injection works"

OpenCode 2 runs a background service that only sees the environment variables it started with. If OpenCode says the key is missing after you exported it, add --standalone to start a private server that reads your current shell.

Claude Code #

Claude Code runs on Anthropic's models, but it can compare and call uncensored models through our MCP server:

claude mcp add --transport http open-uncensored https://openuncensored.com/mcp --header "Authorization: Bearer $OU_API_KEY"

That gives it tools to list models, read the rankings, check your balance and send a prompt to any model.

OpenAI SDK, LangChain, LiteLLM #

import os
from openai import OpenAI

client = OpenAI(base_url="https://openuncensored.com/api/v1", api_key=os.environ["OU_API_KEY"])
reply = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "Explain how SQL injection works."}],
)
print(reply.choices[0].message.content)

LangChain's ChatOpenAI and LiteLLM's openai/ provider take the same base URL and key.

Good to know #

  • Requests are billed per token at exactly the provider's price, with no markup; cached prompt tokens at the provider's cached price.
  • If a model's providers are down, the API falls back to the next best ranked model built on the same original. The X-OU-Model response header says which model answered; send"routing": {"allow_fallbacks": false} to turn that off.
  • Streaming, tools and the usual OpenAI parameters pass through.

Try any of them in a minute #

No account and no sign up. Buy a prepaid key at openuncensored.com/credits, or hand your agent openuncensored.com/agents.md and let it get one for you. Then:

curl https://openuncensored.com/api/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": "Hello"}]}'

The full, always current table is on the rankings page.

── more in #ai-tools 4 stories · sorted by recency
── more on @openuncensored 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/use-uncensored-model…] indexed:0 read:3min 2026-11-12 · —