Skip to main content

Prepare

Choose an anthropic-messages model and copy its ID and regional endpoint. Claude Code uses the gateway root: remove the final /v1 from the Base URL.

Configure and run

Bash / Zsh
Replace YOUR_CODEFLARE_KEY with your Codeflare key. This shell example is for Bash / Zsh. Do not commit the key. Install Claude Code using its official setup instructions.

Verify the connection

Run /status to check the actual endpoint and model, then make a short request. Existing client authentication and other settings may change the active connection. Resolve configuration conflicts if the status does not show the expected values.
Messages, Responses, and Chat Completions are separate protocols. Do not use a model that only supports another protocol. Verify tool calling separately.
For separate model roles, check the client’s current settings in the official gateway guide. Charges follow actual platform usage and model prices.