Cloudflare AI Gateway sits in front of provider APIs and lets you add analytics, caching, and controls. For Anthropic, OpenClaw uses the Anthropic Messages API through your Gateway endpoint.Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
| Property | Value |
|---|---|
| Provider | cloudflare-ai-gateway |
| Base URL | https://gateway.ai.cloudflare.com/v1/<account_id>/<gateway_id>/anthropic |
| Default model | cloudflare-ai-gateway/claude-sonnet-4-6 |
| API key | CLOUDFLARE_AI_GATEWAY_API_KEY (your provider API key for requests through the Gateway) |
For Anthropic models routed through Cloudflare AI Gateway, use your Anthropic API key as the provider key.
Getting started
Set the provider API key and Gateway details
Run onboarding and choose the Cloudflare AI Gateway auth option:This prompts for your account ID, gateway ID, and API key.
Non-interactive example
For scripted or CI setups, pass all values on the command line:Advanced configuration
Authenticated gateways
Authenticated gateways
If you enabled Gateway authentication in Cloudflare, add the
cf-aig-authorization header. This is in addition to your provider API key.Environment note
Environment note
If the Gateway runs as a daemon (launchd/systemd), make sure
CLOUDFLARE_AI_GATEWAY_API_KEY is available to that process.Related
Model selection
Choosing providers, model refs, and failover behavior.
Troubleshooting
General troubleshooting and FAQ.