Claude Code

Run Claude Code on your agent's budget with three settings.

Set these before you start Claude Code, in your shell or in ~/.claude/settings.json under env.

export ANTHROPIC_BASE_URL="https://binference.io/api"
export ANTHROPIC_AUTH_TOKEN="$BINF_API_KEY"
export ANTHROPIC_API_KEY=""

claude

ANTHROPIC_API_KEY is set empty so Claude Code doesn't use a key it found elsewhere.

Choose the model

Claude Code's own model names work as they are. To pick one, set ANTHROPIC_MODEL:

export ANTHROPIC_MODEL="anthropic/claude-sonnet-5.5"

Any listed model works, including ones from other makers, as long as it handles tools well.

Good to know

  • Long sessions: Claude Code resends the conversation on every turn. If a request grows past 4 MB, usually from pasted images, it's refused with 413. Run /compact or /clear.
  • Busy models: a busy model answers 529 overloaded_error, and Claude Code moves to its fallback model.
  • Cost: each turn's charge is on your Calls page within a minute. Put a daily limit on the key you give Claude Code.

On this page