Cloudflare AI Gateway 位于提供方 API 之前,让你可以添加分析、缓存和控制功能。对于 Anthropic,OpenClaw 通过你的 Gateway 端点使用 Anthropic Messages API。Documentation Index
Fetch the complete documentation index at: https://openclaw.zhcndoc.com/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(你用于通过 Gateway 发起请求的提供方 API key) |
对于通过 Cloudflare AI Gateway 路由的 Anthropic 模型,请将你的 Anthropic API key 作为提供方密钥使用。
Getting started
设置提供方 API key 和 Gateway 详情
运行 onboarding 并选择 Cloudflare AI Gateway 认证选项:这会提示你输入 account ID、gateway ID 和 API key。
Non-interactive example
对于脚本或 CI 环境,请在命令行中传入所有值:Advanced configuration
Authenticated gateways
Authenticated gateways
如果你在 Cloudflare 中启用了 Gateway 认证,请添加
cf-aig-authorization 标头。这是额外添加的,不同于你的提供方 API key。Environment note
Environment note
如果 Gateway 作为守护进程运行(launchd/systemd),请确保
CLOUDFLARE_AI_GATEWAY_API_KEY 对该进程可用。Related
Model selection
选择提供方、模型引用和故障切换行为。
Troubleshooting
常规故障排查和 FAQ。