Use Claude Code with Shannon
Point Claude Code at Shannon's Anthropic-compatible endpoint with four environment variables and keep every tool and command it has.
- Tested Nov 7, 2026
- Anthropic Messages
- About 2 min
About Claude Code
Claude Code is Anthropic's coding agent. It works in the terminal, VS Code and JetBrains: it reads the codebase, edits files, runs commands and tests, and handles git. It speaks the Anthropic Messages format, so a few environment variables point it at Shannon's Anthropic-compatible endpoint.
What you need
- A Shannon API key
- Keys & usage
- Base URL
-
https://api.shannon-ai.comEndpoint:/v1/messages - Every snippet below follows your choice.
Set it up
-
Set the endpoint, the key and the models
Claude Code reads its connection from environment variables. The base URL has no
/v1: Claude Code adds/v1/messagesitself. Map all three model tiers to Shannon, because subagents and background tasks ask for them by tier.export ANTHROPIC_BASE_URL=https://api.shannon-ai.com export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY export ANTHROPIC_MODEL=Kimi-K3-uncensored-NVFP4 export ANTHROPIC_DEFAULT_OPUS_MODEL=Kimi-K3-uncensored-NVFP4 export ANTHROPIC_DEFAULT_SONNET_MODEL=Kimi-K3-uncensored-NVFP4 export ANTHROPIC_DEFAULT_HAIKU_MODEL=Kimi-K3-uncensored-NVFP4{ "env": { "ANTHROPIC_BASE_URL": "https://api.shannon-ai.com", "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY", "ANTHROPIC_MODEL": "Kimi-K3-uncensored-NVFP4", "ANTHROPIC_DEFAULT_OPUS_MODEL": "Kimi-K3-uncensored-NVFP4", "ANTHROPIC_DEFAULT_SONNET_MODEL": "Kimi-K3-uncensored-NVFP4", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "Kimi-K3-uncensored-NVFP4" } } -
Start Claude Code
Run
claudein your project as usual, orclaude -p "…"for one task. Files, shell commands, edits, subagents and PDF reading all work.Shellclaude -p "Run the tests, find why they fail and fix it."
A real run on Claude Code 2.1.319: Bash, Read and Edit tool calls, all tests passing.
Check that it works
Send: /status
You should see: The base URL you set and the Shannon model id.
Models that fit Claude Code
Every id below meets what Claude Code needs. The first one is the default in the snippets.
| Model id | Context window | Max output | Image input |
|---|---|---|---|
Kimi-K3-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
Kimi-K3.1-Pro-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
MiMo-V2.6-Pro-uncensored-NVFP4 | 1,022,976 | 131,072 | Yes |
Kimi-K3-uncensored-3BIT-REAP | 225,280 | 225,280 | Yes |
shannon-3 | 196,608 | 65,536 | Yes |
Good to know
- Claude Code only lists models whose names contain "claude", so Shannon ids never appear in
/model: set them with the variables above. ANTHROPIC_AUTH_TOKENsends the key asAuthorization: Bearer;ANTHROPIC_API_KEYsends it asx-api-key. Shannon accepts both; use one.- Claude Code sends many requests per task. Every model,
shannon-coder-1included, is billed in tokens from your API credit, so a long task costs what it reads and writes. - A conversation that outgrows the window gets "prompt is too long", and Claude Code compacts it on its own.
Tips
- Put the variables under
envin~/.claude/settings.json(or the project's.claude/settings.json) so every session starts on Shannon without exporting them. claude -p "…"prints one answer and exits, for scripts and CI jobs.- Type
/compactto shrink a long conversation yourself, and/clearto start a new one in the same project. - To try another model for one session, set
ANTHROPIC_MODELon the command line:ANTHROPIC_MODEL=<id> claude.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
404 on every request | The base URL ends in /v1, so Claude Code calls /v1/v1/messages. | Set ANTHROPIC_BASE_URL to https://api.shannon-ai.com, without /v1. |
unknown model: claude-… | A tier variable is missing, so a subagent asks for a Claude model. | Set all three ANTHROPIC_DEFAULT_…_MODEL variables. |
400 about an unknown field | An experimental beta header the endpoint does not take. | Set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. |
401 Unauthorized | The key is missing, mistyped or rotated. | Copy the key again from Keys & usage; it starts with sk-. |
context_length_exceeded / "prompt is too long" | The conversation is longer than the model's window. | Start a new chat, let the tool compact it, or pick a model with a larger window. |
insufficient_quota | Your balance cannot pay for the request. | Top up or change plan; the request is not retried by itself. |
Questions
Can Claude Code use Shannon models?
Yes. Shannon serves the Anthropic Messages API at https://api.shannon-ai.com/v1/messages; Claude Code connects to it through ANTHROPIC_BASE_URL.
Do tool calls, subagents and PDFs work?
Yes. We ran a full edit-and-test session and a PDF read through Claude Code's own tools.
Which model should Claude Code use?
A long-window model with tool calls, such as Kimi-K3-uncensored-NVFP4, for all three tiers.