Skip to main content

Claude Code

The Claude provider uses the Claude Code harness. Choose either an eligible Claude subscription login or ANTHROPIC_API_KEY; they are separate billing paths.

Access methodConfigurationModel selectionBilling
Claude subscriptionAccounts → Claude → Sign inStable Claude Code aliases such as sonnet and opusSubject to the signed-in plan's Claude Code limits
Anthropic APIANTHROPIC_API_KEY through ./kritt setupModels returned by Anthropic's Models APIAnthropic API usage and workspace limits

Claude subscription login

  1. Start the application

    If another provider is already configured, use ./kritt start. For a first-time, Claude-login-only setup, bootstrap Compose manually because the CLI cannot discover a login that has not been created yet:

    cp .env.example .env
    docker compose up --build
  2. Open Accounts

    Open http://localhost:5173, choose Accounts, then choose Sign in to Claude.

  3. Complete the official login

    Open the authorization URL, authenticate the Claude account, copy the single-line callback code, and paste it back into the Accounts dialog.

  4. Verify the provider

    Accounts should report the Claude login as available. The scan form then exposes the sonnet and opus aliases supported by the bundled Claude Code runtime.

The credential files are stored in the gitignored host directory .data/claude and mounted into the engine and per-job Claude runner. A claude.ai subscription is not an Anthropic API key and does not use API credits. After the first login is saved, ./kritt start recognizes it as configured model access.

Login updates are prepared in an isolated directory and saved atomically, so an abandoned or concurrent login does not replace a working credential. Before a job starts, open·kritt refreshes a near-expiry Claude subscription login and gives the job a private credential snapshot. If refresh cannot produce a usable credential, reconnect Claude in Accounts and resume the scan.

Anthropic API key

  1. Create a Claude Platform account

    Sign in to the Claude Console. If this is an organization account, make sure your role can create API keys in the intended workspace.

  2. Configure API billing

    Add API usage credits or configure billing under Claude Console billing. Claude API usage is separate from a claude.ai subscription.

  3. Create an API key

    Open Settings → API keys on the API keys page, choose the intended workspace and expiration, and create the key. Copy the secret when it is shown.

  4. Save it in open·kritt

    Run ./kritt setup, choose Anthropic API key, and paste the key into the hidden input. The CLI writes it to ANTHROPIC_API_KEY in .env.

  5. Start or recreate the stack

    ./kritt start

    Stop an already-running attached stack with Ctrl+C first so the engine receives the new environment value.

What open·kritt configures

  • Provider: claude
  • Harness: claude-code
  • Credential: the saved Claude login or ANTHROPIC_API_KEY
  • Models: Claude Code aliases for a subscription login; Anthropic Models API results for an API key

Claude Code runs inside the engine/runner containers. You do not need to install the Claude Code CLI on the host.

Verify and troubleshoot

  • For an API key, ./kritt setup should show Anthropic API key present.
  • For a subscription, the Accounts page should show the Claude login and plan status.
  • The create and generation forms should list Claude after the stack starts.
  • A 401 usually means the key is invalid, revoked, or expired. Create a replacement key and update it through ./kritt setup.
  • A credit or quota error comes from the Claude Platform account. Check its billing, workspace limits, and key scope.
  • If the provider is present but no models load, inspect docker compose logs engine and confirm the containers can reach the Claude/Anthropic endpoints.

See Anthropic's official API authentication guide and Claude Code authentication guide for current key and credential-precedence behavior.

Next: configure Codex, OpenRouter, or learn how to choose a model and harness.