## Overview

Claude Code is Anthropic's official coding CLI. It primarily authenticates via Anthropic account/API flow, but also supports LLM gateway-style configuration in some setups.

## Prerequisites

- Claude Code installed
- ModelStack API key

## Installation

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

## Configure with ModelStack

Add environment settings in `.claude/settings.local.json`:

```json
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "ANTHROPIC_BASE_URL": "https://api.modelstack.cc",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_MODELSTACK_API_KEY",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6"
  }
}
```

This config routes Claude Code through ModelStack and sets your default custom models for Haiku, Sonnet, and Opus.

Then run Claude Code normally.

<Warning>
  Claude Code behavior can vary by version and auth mode. If your current build
  enforces Anthropic-hosted auth only, use tools with direct OpenAI-compatible
  provider settings (Cursor, Continue, Cline, Roo Code, Aider, etc.).
</Warning>

## Next Steps

- [Quickstart](/quickstart)
- [Supported Models](/models/supported-models)

---
