本文へ移動

Claude Code

Caveat

Anthropic's terminal coding agent. Caveat: needs a translating proxy — Messages wire not served.

Caveat: api.mithril.fund does not serve the Anthropic Messages wire (POST /v1/messages) yet — measured 405 on 2026-09-15. To use Claude Code, put a local proxy that translates Anthropic → OpenAI (LiteLLM, for example) in between and point ANTHROPIC_BASE_URL at it. See the Anthropic SDK page.

Setup

Shell
# Anthropic Messages is not served on api.mithril.fund (POST /v1/messages → 405).
# Run a translating proxy (LiteLLM, etc.), then point Claude Code at the proxy.
# The proxy calls OpenAI wire: https://api.mithril.fund/v1 with Bearer kc_pat_…

export OPENAI_BASE_URL="https://api.mithril.fund/v1"
export OPENAI_API_KEY="kc_pat_<your-token>"
# export ANTHROPIC_BASE_URL=http://127.0.0.1:4000   # local proxy
# export ANTHROPIC_API_KEY=anything                 # proxy holds the real token
# claude -p "Reply with exactly: OK"

The research gates (verification, scope, free quota) are identical to the cookie session; the token only removes the origin gate.

← All tools