直接回答
Claude Code talks the Anthropic protocol natively — point it at the gateway host, no path suffix. 這頁會補充接入步驟、設定重點和常見問題。
Native Anthropic ingress
The gateway serves the Anthropic Messages wire format on /v1/messages — the same path as Anthropic's own API — so Claude Code needs only its standard environment: the host, the key, and full catalog model ids. ANTHROPIC_AUTH_TOKEN is sent as a Bearer header, which the ingress accepts alongside x-api-key.
export ANTHROPIC_BASE_URL="https://api.nextmodel.app"
export ANTHROPIC_AUTH_TOKEN=$NEXTMODEL_API_KEY
# Full catalog ids required — /v1/models is the source of truth:
export ANTHROPIC_MODEL="anthropic/claude-sonnet-4.5"
export ANTHROPIC_SMALL_FAST_MODEL="anthropic/claude-haiku-4.5"Switching models mid-session
The /model command lists what Claude Code offers; typing a full catalog id such as anthropic/claude-opus-5.5 routes to that model. Abbreviated Anthropic names (claude-sonnet-4-5 without the prefix) are not catalog ids and fail with model_not_supported.
Verify
One command proves the wiring before you start a session.
curl -s https://api.nextmodel.app/v1/models -H "Authorization: Bearer $NEXTMODEL_API_KEY" | head -c 300