Updated November 18, 2026
Uncensored models in Claude Code and Codex.
Claude Code and the Codex CLI can run other models. This is how to run an uncensored one in each, with the setup we tested.
Short answer
Point the tool at OpenUncensored, which serves the Anthropic Messages API that Claude Code uses and the OpenAI Responses API that Codex uses, so no proxy is needed. For Claude Code, setANTHROPIC_BASE_URL=https://api.openuncensored.com (no /v1), your key as ANTHROPIC_API_KEY, and an uncensored model id in ANTHROPIC_MODEL and the background model variables. For Codex, add a model provider with base_url = "https://api.openuncensored.com/v1" and wire_api = "responses". The best uncensored model for agents right now is GLM 5.3 Flash Uncensored (glm-5.3-flash-uncensored).Claude Code
Claude Code, direct.
Buy a prepaid key on the credits page with no account (the key is the account), or point your agent at agents.md and let it buy one.
export ANTHROPIC_BASE_URL=https://api.openuncensored.com
export ANTHROPIC_API_KEY=ou-...
export ANTHROPIC_MODEL=glm-5.3-flash-uncensored
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
claude- The base URL has no
/v1: Claude Code adds/v1/messagesitself. - Claude Code also calls smaller models for background work and subagents. The
ANTHROPIC_DEFAULT_*andCLAUDE_CODE_SUBAGENT_MODELvariables point those at the same uncensored model; without them it asks for a Claude model and fails. - Tool calls, file edits, shell commands, images and streaming work. Prompt caching is automatic and
/costshows the cached tokens.
Codex CLI
Codex, direct.
# ~/.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 = "glm-5.3-flash-uncensored"Codex speaks the OpenAI Responses API, which the same key serves at /v1/responses. File edits, shell commands and multi-step tasks work as usual.
Keep Claude
Or keep Claude as the agent.
To keep Claude as the agent and hand only some requests to an uncensored model, add the OpenUncensored MCP server. Claude gets tools to list models, read the rankings and send a prompt to any of them, billed to your key.
claude mcp add --transport http open-uncensored https://openuncensored.com/mcp \
--header "Authorization: Bearer ou-..."Which model
Best uncensored models for agents.
| Model | Model id | Agentic | Agent tasks | Speed | $ / 1M in · out |
|---|---|---|---|---|---|
| GLM 5.3 Flash Uncensored | glm-5.3-flash-uncensored | 66 | 3/5 | 178 tok/s | $0.12 · $0.50 |
| DeepSeek V4.1 Flash 1017 Uncensored | deepseek-v4.1-flash-1017-uncensored | 55 | 2/5 | 239 tok/s | $0.33 · $1.32 |
| MiMo V2.6 Flash Uncensored | mimo-v2.6-flash-uncensored | 55 | 2/5 | 118 tok/s | $0.46 · $1.50 |
| DeepSeek V4.1 Flash 0910 Uncensored | deepseek-v4.1-flash-0910-uncensored | 53 | 2/5 | 209 tok/s | $0.33 · $1.32 |
| GLM 5.3 Uncensored | glm-5.3-uncensored | 53 | 2/5 | 117 tok/s | $0.39 · $1.32 |
| MiMo V2.6 Flash Abliterated | mimo-v2.6-flash-abliterated | 53 | 2/5 | 99 tok/s | $0.50 · $1.50 |
Troubleshooting
If it doesn't work.
- Claude Code says the model does not exist: set the four background model variables above.
- The agent loops on one tool call: switch to a model with more agent tasks finished in the table above.
- Tool calls arrive as plain text: the model is not following the tool format; try another model.
- `402`: the key is out of credit. Top it up on the credits page.
FAQ
Questions people ask.
How do I use an uncensored model in Claude Code or the Codex CLI?
Point the tool at OpenUncensored, which serves the Anthropic Messages API that Claude Code uses and the OpenAI Responses API that Codex uses, so no proxy is needed. For Claude Code, set ANTHROPIC_BASE_URL=https://api.openuncensored.com (no /v1), your key as ANTHROPIC_API_KEY, and an uncensored model id in ANTHROPIC_MODEL and the background model variables. For Codex, add a model provider with base_url = "https://api.openuncensored.com/v1" and wire_api = "responses". The best uncensored model for agents right now is GLM 5.3 Flash Uncensored (glm-5.3-flash-uncensored).
Do I need a proxy like LiteLLM?
No. The API serves the Anthropic Messages API and the OpenAI Responses API natively, so both tools connect directly.
Which uncensored model is best in Claude Code?
GLM 5.3 Flash Uncensored (glm-5.3-flash-uncensored): the highest agentic score among ranked models fast enough for agent loops. Other good options are in the table on this page.
Does prompt caching work?
Yes. The hosts cache the conversation on their own, cached input is billed at the lower cached rate, and Claude Code's /cost shows it.
Do I need an account?
No. Buy a prepaid key on the credits page and use it as the API key. The key is the account, and it cannot spend more than you loaded.
Updated November 18, 2026. Scores measured November 8, 2026. Markdown version: /claude-code-codex-uncensored-model.md