Skip to content
AI Price Spy
AI Price Spy
Advertise

AI PRICE SPY

Claude Code gateway setup: Messages, credentials and billing

Compare published rates, inspect evidence and connect your tools.

Check Anthropic Messages compatibility, set the gateway URL and credential together, and verify the selected route, streaming and billable usage.

Explanation reviewed:

Confirm what the gateway actually supports

Use the gateway’s documented Anthropic Messages endpoint and exact model names. Check its tool-use and streaming behavior, not just a basic chat response. Official protocol guidance explains the Messages route and required headers.

Record your installed Claude Code version and the source date. The steps here do not establish that every provider in the directory supports Claude Code. No paid compatibility test was performed for this guide.

Set the URL and credential as one configuration

Back up current settings. In the current shell, set ANTHROPIC_BASE_URL to the documented gateway base URL. Choose ANTHROPIC_AUTH_TOKEN for a gateway using Bearer authorization, or ANTHROPIC_API_KEY for one using x-api-key; follow the actual gateway’s method rather than setting both blindly.

Keep secrets out of committed settings. Existing settings-file environment values can override shell values, so inspect the configuration you control before starting. Changing only the URL can leave a saved Claude account credential active; it does not establish a new billing identity.

Check the active route, then run a small test

In a new Claude Code session, use /status to confirm the actual URL and credential source. With the intended model, run a small disposable task and inspect streaming, tool results and the gateway’s usage report. Confirm which account is charged.

Subscription allowances, eligible claimed API credits and gateway balances have different conditions. Do not infer who pays from a plan name or base URL alone. Treat the task as verified only after both its accepted output and billing record have been checked.

Fix protocol errors before increasing spend

Authentication failures call for checking the chosen header method and credential source. Missing-model failures require the exact gateway model ID. Stalls can indicate buffered or incomplete streaming; tool failures may indicate protocol incompatibility.

Compare the gateway’s configuration with its documentation, then restore the original settings if the combination fails. Do not paste raw keys or private prompts into a public error report.

Official references