How to use Claude Code with an uncensored, unlimited model
Unquant serves an Anthropic-compatible Messages endpoint, so Claude Code connects directly. Point it at Unquant, add your key, and every agent run is uncensored and unlimited, with no proxy to install.
1 Get an API key
Create a key under API keys in your Unquant workspace. Any plan works; GLM-5.3-Flash is the stronger coding model, with the full 262K context on every tier.
2 Point Claude Code at Unquant
export ANTHROPIC_BASE_URL=https://api.unquant.io export ANTHROPIC_AUTH_TOKEN=your-unquant-key export ANTHROPIC_MODEL=glm-5.3-flash export CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144$env:ANTHROPIC_BASE_URL = "https://api.unquant.io" $env:ANTHROPIC_AUTH_TOKEN = "your-unquant-key" $env:ANTHROPIC_MODEL = "glm-5.3-flash" $env:CLAUDE_CODE_MAX_CONTEXT_TOKENS = "262144"3 Start Claude Code
Run
claudein your project. If you were signed in to a Claude account before, run/logoutonce so Claude Code uses your Unquant key, and make sureANTHROPIC_API_KEYis not also set to an Anthropic key.
Make it permanent
Put the same values in ~/.claude/settings.json so every session uses them:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.unquant.io",
"ANTHROPIC_AUTH_TOKEN": "your-unquant-key",
"ANTHROPIC_MODEL": "glm-5.3-flash",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "262144"
}
}
How it behaves
- ModelsAny Claude model name Claude Code asks for, including its small background model, is served by the model on your plan. Set
ANTHROPIC_MODELto choose explicitly. - Model namesKeep
ANTHROPIC_MODELset toglm-5.3-flash(orqwen-3.8-flash-next). With a Claude model name such asclaude-opus-5-5, or any id ending in[1m], Claude Code assumes that model's 1M window, ignoresCLAUDE_CODE_MAX_CONTEXT_TOKENSand stops compacting, so the session fails once it passes 262K tokens. The same applies behind a local proxy: give it the real 262,144-token window and never pick its 1M variant. - ThinkingClaude Code's thinking setting maps to reasoning effort: off is
none, small budgetslow, larger oneshighormax. - ToolsFile edits, shell commands and every other Claude Code tool run through standard tool calling, with images passed through as well.
- ContextGLM-5.3-Flash serves 262,144 tokens on every plan, so whole-repository sessions fit before Claude Code needs to compact. With
CLAUDE_CODE_MAX_CONTEXT_TOKENSset, Claude Code only adds to your history, so each turn reuses the cached conversation and starts fast.
Troubleshooting
Check ANTHROPIC_AUTH_TOKEN holds your Unquant key, and that no other Anthropic key is set.
Run /logout, then start Claude Code again with the variables set.
The base URL must be https://api.unquant.io, with no /v1.
Set CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144 (above). Without it Claude Code rewrites older messages every turn once the session passes about 100K tokens, and everything after that point is processed again.
It is using a Claude model name or an id ending in [1m], for which it assumes 1M tokens whatever the variables say. Set ANTHROPIC_MODEL=glm-5.3-flash (through a proxy, a model id that does not start with claude- and has no [1m]), then /compact. Past 262K the gateway now trims the oldest messages out of the compaction itself so it still goes through.
All your concurrent streams are busy, usually with parallel subagents. Claude Code retries; see the note above.
Keep reading
- How to use OpenAI Codex CLI with UnquantAdd Unquant to OpenAI Codex CLI as a custom model provider in ~/.codex/config.toml. Unquant serves the Responses API Codex needs, so it connects directly, with unlimited tokens.
- How to add Unquant to OpenCodeAdd Unquant to OpenCode as an OpenAI-compatible provider in opencode.json and run the terminal coding agent on GLM-5.3-Flash with 262K context and unlimited tokens.
- Uncensored AI for coding and agentsWhy developers use an uncensored model for coding and agents: no refusals on security work, reverse engineering or edgy content pipelines, plus 262K context and unlimited tokens for long agent loops.