Skip to content

Claude Desktop

Claude Desktop can send third-party inference requests to a custom gateway. This configuration sends those requests to AI Gateway's Anthropic endpoint, authenticated with your Cloudflare gateway token. AI Gateway can supply the Anthropic credentials for you through Unified Billing or a stored provider key (BYOK).

Prerequisites

Before you start, you need:

  1. In Claude Desktop, select Help > Troubleshooting > Enable Developer Mode.

  2. Select Developer > Configure Third-Party Inference.

  3. In Connection, set the connection type to Gateway.

  4. In Gateway credentials, set Credential kind to Static API key.

  5. Set Gateway API key to your Cloudflare gateway token.

    Replace <CF_AIG_TOKEN> with your gateway token.

    <CF_AIG_TOKEN>
  6. Set Gateway auth scheme to Bearer.

  7. Set the gateway base URL to your gateway's Anthropic endpoint.

    Replace <ACCOUNT_ID> and <GATEWAY_ID> with your values.

    https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/<GATEWAY_ID>/anthropic
  8. In Models, add the Claude model you want to use.

    FieldValue
    Model IDclaude-sonnet-4-5
    Display nameClaude Sonnet 4.5
    Tier aliassonnet
  9. In Gateway credentials, select Test connection.

  10. Start a Claude Desktop conversation. Requests now route through AI Gateway.

To confirm traffic reaches AI Gateway, refer to Verify it works.