POST /v1/messages (including /v1/messages/count_tokens), so Claude Code can be directed to Hostlinku simply by setting an environment variable—no additional proxy is needed.
Authentication: AUTH_TOKEN or API_KEY?
Both are accepted by the gateway; choose one—do not enter both with different values.
VS Code & JetBrains Extensions
The Claude Code extension checks for the login on its own, so the same variables must also be specified in the extension settings — VS Code:claudeCode.environmentVariables in settings.json:
Use a non-Claude model
Since the gateway translates protocols, thesonnet/haiku alias can be set to any slug from the catalog:
capabilities field in the catalog.
Troubleshooting
401 authentication_erroreven though the key is correct — old OAuth credentials are still being used. Run/logout, log out, and make sureANTHROPIC_BASE_URLis accessible (/status).- Model not found (
404) — meaning it hasn’t been pinned yet, so Claude Code sends the model name by default. SetANTHROPIC_DEFAULT_*_MODELto the catalog’s slug. 400 max_tokens exceeds the limit— reducemax_tokensviaCLAUDE_CODE_MAX_OUTPUT_TOKENS(e.g.,32000) if the target model has a smaller output limit.- Rate limit (
429) — Claude Code can run multiple sub-agents in parallel. See the limits at Usage & Limits.

