Skip to main content
idapt
HomeAI ModelsExploreResourcesPricing
Sign inUse for Free
HomeDevelopersAI Gateway quickstartsClaude Code

Claude Code with idapt

Three environment variables route Claude Code through idapt, with per-key spend caps on top.

  1. 1

    Install

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

    Point it at idapt

    bash
    export ANTHROPIC_BASE_URL="https://idapt.app/api/anthropic"
    export ANTHROPIC_AUTH_TOKEN="$IDAPT_API_KEY"
    export ANTHROPIC_API_KEY=""
    claude

    Add these to your shell profile so every session picks them up. The base URL has no /v1: Claude Code appends /v1/messages itself.

  3. 3

    Going further

    bash
    # Optional: pin models per task class, then confirm with /model
    export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic/claude-sonnet-5"
    export CLAUDE_CODE_SUBAGENT_MODEL="anthropic/claude-sonnet-5"
    export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1

    Discovery populates the /model picker from the gateway. Pin the other classes (OPUS, HAIKU, FABLE) the same way.

GOOD TO KNOW

API keys and scopesOpenAI-compatible API referenceOpenRouter-compatible API referenceRate limits and errorsSpend caps and budgets

MORE QUICKSTARTS

Codex CLI

OpenCode

Cursor

  • Home
  • Pricing
  • AI Models
  • Skills
  • Image models
  • Voice models
  • Video models
  • Rankings
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • Blog
  • About
  • Comparisons
  • Benchmarks
  • Model Match
  • Demos
  • Help center
  • FAQ
  • Privacy
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Migrate
  • Downloads
  • Desktop
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)Discord