Skip to content
Docs · 2026-05-29

TL;DR: Set ANTHROPIC_BASE_URL=https://api.juscode.co and ANTHROPIC_AUTH_TOKEN=jcg_... in your shell. jusCode speaks the Anthropic Messages API natively at /v1/messages (Claude Code's default) and routes every call to the cheapest capable model under the hood.

Use jusCode with Claude Code

Claude Code is Anthropic's terminal-native coding agent. It speaks the Anthropic Messages API (POST /v1/messages) by default. jusCode exposes that exact surface, so Claude Code points at api.juscode.co with one env-var change and everything else (tool use, streaming, thinking, system prompts) keeps working unchanged. Under the hood, jusCode routes each call to the cheapest capable model.

Why route through jusCode?

  • Cost. We pick the most cost-effective model that meets the bar for each call: frontier when you need it, smaller when you don't. Same API, lower bill.
  • No vendor lock-in. Your code only ever talks to api.juscode.co. We swap models behind the scenes as the market moves.
  • One bill. Credits roll over, never expire. Per-user soft caps. No surprise overages.
  • Same DX. Your existing Claude Code workflow doesn't change, just the endpoint.

30-second setup

1. Get a jusCode API key

# Sign in at https://juscode.co/login (Google or Microsoft)
# Then visit https://juscode.co/developer → Keys tab → "Mint key"
# Copy the jcg_… token. You'll only see it once.

2. Point Claude Code at jusCode

Claude Code uses two environment variables for OpenAI-compatible mode:

export ANTHROPIC_BASE_URL="https://api.juscode.co"
export ANTHROPIC_AUTH_TOKEN="jcg_your_key_here"

Add those to your shell profile (~/.zshrc, ~/.bashrc) and reload:

source ~/.zshrc

3. Verify

claude --version
claude  # should start a normal session

Inside Claude Code, ask it anything, say, "summarize this directory". The call is routed through jusCode. Verify the spend on your dashboard.

Per-project override

If you only want jusCode for one repo:

# Create .envrc in your repo (with direnv) or a shell alias:
alias claude-juscode='ANTHROPIC_BASE_URL=https://api.juscode.co \
  ANTHROPIC_AUTH_TOKEN=jcg_... claude'

What jusCode picks

jusCode routes every request through three filters:

  1. Capability: does the task need hard reasoning, long context, or tool use?
  2. Cost: per-token rate, cache hit rate, retry cost
  3. Fit: task type, codebase size, your spend profile

The chosen model isn't surfaced. Model identity is part of how the routing delivers its cost. The Usage tab shows per-call cost so your bill stays transparent; the model behind each call stays ours.

Limits and gotchas

  • Streaming works. Server-sent events are forwarded transparently.
  • Tool use works. Both Anthropic-style and OpenAI-style tool calls are normalized.
  • System prompts work. No magic; they pass through untouched.
  • Image inputs route to a vision-capable model automatically.
  • Rate limits: 60 RPM per key, 600 RPM per tenant. Bump in the dashboard if you need more.

Troubleshooting

SymptomLikely causeFix
401 INVALID_KEYKey was revoked or never mintedMint a fresh key in the dashboard
403 SEAT_REQUIREDTenant has >1 member with no seat subSubscribe in Billing tab
429 RATE_LIMITBurst hit the per-key 60 RPMWait 60s or raise the limit
502Upstream model temporarily unavailableRetry; jusCode automatically falls back

Uninstall

Remove the jusCode env vars and go back to your default in one command:

curl -fsSL https://juscode.co/install/uninstall.sh | sh      # macOS · Linux · WSL
irm https://juscode.co/install/uninstall.ps1 | iex           # Windows PowerShell

Claude Code stays installed; only the jusCode wiring is removed. Full details: Uninstall jusCode.


This page is also available as raw markdown for AI agents to consume directly: /docs/claude-code.md