← Blog

November 6, 2026 · updated November 14, 2026 · guides · coding agents · setup

How to use uncensored models in Cursor, Cline, Codex, OpenCode and Claude Code

Point any coding tool at uncensored models: base URL, key and model id for Cline, Kilo, Roo, Cursor, Codex CLI, OpenCode, Claude Code (native, no proxy), and the OpenAI SDK.

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

Pick a model id from the rankings or GET https://api.openuncensored.com/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://api.openuncensored.com/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://api.openuncensored.com/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://api.openuncensored.com/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 https://api.openuncensored.com/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://api.openuncensored.com/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 speaks Anthropic's Messages API, which we serve too, so it runs directly on any uncensored model:

export ANTHROPIC_BASE_URL=https://api.openuncensored.com
export ANTHROPIC_API_KEY=$OU_API_KEY
export ANTHROPIC_MODEL=deepseek-v4.1-flash-1017-uncensored
# point its background models and subagents at the same model
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
claude

Details in the Claude Code guide. To keep Claude as the agent and call uncensored models as a tool instead, add 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://api.openuncensored.com/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://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": "Hello"}]}'

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

Frequently asked questions

Can I use an uncensored model in Cursor?

Yes. Add a custom OpenAI compatible endpoint with the base URL https://api.openuncensored.com/v1, your OpenUncensored key and a model id.

How do I use uncensored models with Codex CLI?

Add a model provider in Codex's config pointing at https://api.openuncensored.com/v1. Codex uses the Responses API, which OpenUncensored serves.

How do I use uncensored models in OpenCode?

Add an openuncensored provider to opencode.json with the openai-compatible package, the base URL https://api.openuncensored.com/v1 and the model ids you want, set OPENUNCENSORED_API_KEY, then pick the model with /models or opencode run -m openuncensored/<model id>.

Does Claude Code work with uncensored models?

Yes. OpenUncensored serves the Anthropic Messages API, so Claude Code runs directly on uncensored models: set ANTHROPIC_BASE_URL to https://api.openuncensored.com, ANTHROPIC_API_KEY to your key, and ANTHROPIC_MODEL plus the background model variables to a model id. Claude can also stay the agent and call uncensored models as tools through the MCP connector.