Cloudflare AI Gateway 位於 Provider API 前方,讓你新增分析、快取與控制。對於 Anthropic,OpenClaw 會透過你的 Gateway 端點使用 Anthropic Messages API。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.
| 屬性 | 值 |
|---|---|
| Provider | cloudflare-ai-gateway |
| 基礎 URL | https://gateway.ai.cloudflare.com/v1/<account_id>/<gateway_id>/anthropic |
| 預設模型 | cloudflare-ai-gateway/claude-sonnet-4-6 |
| API 金鑰 | CLOUDFLARE_AI_GATEWAY_API_KEY(你用於透過 Gateway 發出請求的 Provider API 金鑰) |
對於透過 Cloudflare AI Gateway 路由的 Anthropic 模型,請使用你的 Anthropic API 金鑰 作為 Provider 金鑰。
開始使用
設定 Provider API 金鑰與 Gateway 詳細資料
執行 onboarding 並選擇 Cloudflare AI Gateway 驗證選項:這會提示你輸入帳戶 ID、Gateway ID 與 API 金鑰。
非互動式範例
對於指令碼或 CI 設定,請在命令列傳入所有值:進階設定
已驗證的 Gateway
已驗證的 Gateway
如果你已在 Cloudflare 啟用 Gateway 驗證,請新增
cf-aig-authorization 標頭。這是 除了 你的 Provider API 金鑰以外的設定。環境注意事項
環境注意事項
如果 Gateway 以 daemon(launchd/systemd)執行,請確認
CLOUDFLARE_AI_GATEWAY_API_KEY 可供該程序使用。相關
模型選擇
選擇 Provider、模型 refs 與容錯移轉行為。
疑難排解
一般疑難排解與常見問題。