Claude Code

Add a separate claude-gradiated command for Gradiated models. Your existing claude command continues to use its current provider.

Set up automatically

Run the Gradiated wizard:

npx -y @gradiated/wizard --agent claude

The wizard lets you choose a model and installs claude-gradiated. For zsh and bash, it also adds ~/.gradiated/bin to your PATH.

Start Claude Code on Gradiated:

claude-gradiated

The command reads the Gradiated key from ~/.gradiated/credentials.json.

Switch models inside a session:

/model YOUR_MODEL

Or override the model for one run:

ANTHROPIC_MODEL="YOUR_MODEL" claude-gradiated

API-key accounts

claude-gradiated requires a Claude Code API-key account. Claude Pro and Max subscriptions cannot authenticate through a custom gateway.

The wrapper sets ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL. Values already set in your shell take priority.

Set up manually

Use manual setup if you prefer to start the standard claude command with Gradiated environment variables.

Set the variables in the shell that will start Claude Code:

export GRADIATED_API_KEY="grad_..."
export ANTHROPIC_BASE_URL="https://api.gradiated.com"
export ANTHROPIC_AUTH_TOKEN="$GRADIATED_API_KEY"
export ANTHROPIC_MODEL="YOUR_MODEL"
claude

Replace YOUR_MODEL with a model from models and pricing.

Remove the variables to return to your normal Claude Code provider:

unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL

Troubleshooting

  • Check that ANTHROPIC_BASE_URL does not include /v1.
  • Check that ANTHROPIC_AUTH_TOKEN contains your Gradiated API key.
  • Check that ANTHROPIC_MODEL matches the Gradiated catalog.
  • Check that the workspace has billing capacity.
  • If claude-gradiated is not found, open a new shell after install or add ~/.gradiated/bin to your PATH.

Uninstall

Run the uninstall command:

npx -y @gradiated/wizard uninstall

Select the Claude Code wrapper. The wizard removes the command and its PATH entry. It does not change ~/.claude or the normal claude command.