gradiated

Use Gradiated with Claude Code

Add a claude-gradiated command for Gradiated models. Your normal claude command stays unchanged.

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 adds ~/.gradiated/bin to your PATH.

Start Claude Code on Gradiated:

claude-gradiated

The command reads the Gradiated key from ~/.gradiated/credentials.json. Your normal claude command continues to use its current Anthropic route.

Switch models inside a session:

/model YOUR_MODEL_ID

Or override the model for one run:

ANTHROPIC_MODEL="YOUR_MODEL_ID" claude-gradiated

API-key accounts

claude-gradiated works with Claude Code API-key accounts. A Claude Pro or Max subscription cannot authenticate through a custom gateway.

The wrapper sets ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL. Your shell values override the wrapper values.

Set up manually

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_ID"
claude

Replace YOUR_MODEL_ID with an ID from models and pricing.

Remove the variables to use your normal Claude Code route again:

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.