Claude Code with idapt
Route Claude Code's inference through idapt: one environment variable, per-key spend caps included.
Last reviewed 2026-07-17
Point it at idapt
bash
export ANTHROPIC_BASE_URL="https://idapt.app/api/anthropic/v1"
export ANTHROPIC_API_KEY="$IDAPT_API_KEY"
claudeClaude Code reads both variables at startup; unset them to switch back.
Going further
bash
# Optional: give Claude Code your idapt workspace over MCP
claude mcp add --transport http idapt https://idapt.app/api/mcp \
--header "Authorization: Bearer $IDAPT_API_KEY"Inference routing and workspace access are independent; use either or both.
Pitfalls
Spend caps make agent keys safe
Mint a dedicated key with a lifetime, monthly, or daily USD cap before handing it to an agent. The cap is enforced on every metered endpoint.