> ## Documentation Index
> Fetch the complete documentation index at: https://floodgate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Install Claude Code and route Claude Opus 5 through Floodgate.

Use **`claude-opus-5-5`** with Claude Code for the strongest architectural reasoning and long-horizon engineering tasks.

## 1. Install Claude Code

<CodeGroup>
  ```bash macOS, Linux, or WSL theme={null}
  curl -fsSL https://claude.ai/install.sh | bash
  ```

  ```powershell Windows PowerShell theme={null}
  irm https://claude.ai/install.ps1 | iex
  ```

  ```bash npm theme={null}
  npm install -g @anthropic-ai/claude-code
  ```
</CodeGroup>

## 2. Set the endpoint, key, and model

<CodeGroup>
  ```bash macOS, Linux, or WSL theme={null}
  export ANTHROPIC_BASE_URL="https://api.floodgate.dev"
  export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
  export ANTHROPIC_MODEL="claude-opus-5-5"
  ```

  ```powershell Windows PowerShell theme={null}
  $env:ANTHROPIC_BASE_URL = "https://api.floodgate.dev"
  $env:ANTHROPIC_AUTH_TOKEN = "YOUR_API_KEY"
  $env:ANTHROPIC_MODEL = "claude-opus-5-5"
  ```
</CodeGroup>

<Warning>
  Claude Code appends `/v1/messages` itself. Use `https://api.floodgate.dev` here, **without** the final `/v1`.
</Warning>

## 3. Run Claude Code

```bash theme={null}
cd /path/to/your/project
claude --model claude-opus-5-5
```

Run `/status` inside Claude Code to verify that the Anthropic base URL points to Floodgate and the model is `claude-opus-5-5`.

### Other Supported Models

You can switch models depending on your task:

```bash theme={null}
# Claude Opus 5 (previous frontier)
claude --model claude-opus-5

# Claude 5 Sonnet (high speed & balanced intelligence)
claude --model claude-sonnet-5
```

## Persistent Configuration

Save this as `~/.claude/settings.json`. On Windows, use `%USERPROFILE%\.claude\settings.json`.

```json theme={null}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.floodgate.dev",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "claude-opus-5-5"
  },
  "model": "claude-opus-5-5"
}
```

<Info>
  Claude Code is designed specifically for Claude models. For best results, use `claude-opus-5-5`, `claude-opus-5`, or `claude-sonnet-5`.
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.