Skip to main content
Claude Code is the agentic coding tool that runs in your terminal (documentation). It speaks the Anthropic Messages format, and the UncensoredGPT API serves that format natively (/v1/messages), so it connects with two environment variables.

1. Set your API key

Create a key in the Console if you don’t have one, then export it:

2. Point Claude Code at UncensoredGPT

That’s it — ANTHROPIC_BASE_URL routes every request to UncensoredGPT, and ANTHROPIC_AUTH_TOKEN authenticates them.
ANTHROPIC_BASE_URL has no /v1 suffix. Claude Code appends the endpoint paths itself.

3. Pick your models

Claude Code’s model aliases (sonnet, haiku, …) don’t exist on UncensoredGPT, so map them to real model IDs:
  • ANTHROPIC_MODEL sets the model for the session.
  • ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL control what the sonnet and haiku aliases resolve to — Claude Code uses the haiku alias for background tasks, so pointing it at a fast model like uncensoredgpt/glm-5.3-flash-uncensored keeps those cheap.
You can also switch models mid-session with /model <model-id>:

Make it permanent with settings.json

Instead of exporting variables on every shell, put them in ~/.claude/settings.json:
The settings file stores the key in plain text. Prefer the environment-variable setup on shared machines, and never commit ~/.claude/settings.json to a repository.

Good to know

  • Everything Claude Code sends goes to the Messages endpoint in the Anthropic format — request and response bodies follow that spec exactly.
  • Tool calling (Claude Code’s bread and butter) is fully supported.
  • Context windows per model are listed on the coding agents overview — for long sessions, the 1M-context models are a good fit.
  • Usage and cost of every request appear in the Console’s Usage page.