Trả lời trực tiếp

Trang này giải thích cách các đội dùng cổng tương thích OpenAI của NextModel. Claude Code talks the Anthropic protocol natively — point it at the gateway host, no path suffix. Nó bổ sung các bước thực tế, ghi chú cấu hình, và những câu hỏi thường gặp.

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.

Shell profile
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.

Verify
curl -s https://api.nextmodel.app/v1/models -H "Authorization: Bearer $NEXTMODEL_API_KEY" | head -c 300