{"slug":"cloudflare-ai-gateway-setup","verification":{"valid":false,"broken_at":0,"reason":"prev mismatch"},"count":21,"sources":[{"id":"s1","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/get-started/","title":"Cloudflare AI Gateway — Get started","publisher":"Cloudflare","date":"2026-07-26","quote":"If no gateway with the ID default exists, one will be automatically created.","summary":"Documents the automatically created default gateway and its initial authentication, logging, caching, and rate-limit behavior.","claim_ids":["c1"]},{"id":"s2","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/configuration/authentication/","title":"Cloudflare AI Gateway — Authentication","publisher":"Cloudflare","date":"2026-07-26","quote":"The AI Gateway Read, Run, and Edit permissions cannot be restricted to a single gateway","summary":"Documents authenticated gateways, the cf-aig-authorization header, and account-wide AI Gateway permissions.","claim_ids":["c2"]},{"id":"s3","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/usage/rest-api/","title":"Cloudflare AI Gateway — REST API","publisher":"Cloudflare","date":"2026-07-26","quote":"Workers AI models (@cf/) do not support this schema.","summary":"Documents the account REST endpoints, request schemas, and model compatibility boundaries.","claim_ids":["c3"]},{"id":"s4","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/glossary/","title":"Cloudflare AI Gateway — Header glossary","publisher":"Cloudflare","date":"2026-07-26","quote":"Custom metadata allows you to tag requests with user IDs or other identifiers","summary":"Reference for cf-aig request and response headers, their defaults, and their effects.","claim_ids":["c6"]},{"id":"s5","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/features/caching/","title":"Cloudflare AI Gateway — Caching","publisher":"Cloudflare","date":"2026-07-26","quote":"Caching applies only to identical requests.","summary":"Documents the exact-request cache, TTL controls, custom keys, and cache-status response header.","claim_ids":["c7"]},{"id":"s6","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/features/rate-limiting/","title":"Cloudflare AI Gateway — Rate limiting","publisher":"Cloudflare","date":"2026-07-26","quote":"Once the rate limit is exceeded, requests will be blocked with a 429 status code.","summary":"Documents fixed and sliding windows and the HTTP response after the configured cap is reached.","claim_ids":["c8"]},{"id":"s7","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/observability/logging/","title":"Cloudflare AI Gateway — Logging","publisher":"Cloudflare","date":"2026-07-26","quote":"AI Gateway logs contain detailed information about requests and responses.","summary":"Documents stored request and response data, payload collection controls, and API access to log rows.","claim_ids":["c9"]},{"id":"s8","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/observability/costs/","title":"Cloudflare AI Gateway — Costs","publisher":"Cloudflare","date":"2026-07-26","quote":"The cost metric is an estimation based on the number of tokens sent and received in requests.","summary":"Cloudflare's qualification of gateway cost data as an estimate rather than an invoice.","claim_ids":["c11"]},{"id":"s9","type":"hn","url":"https://news.ycombinator.com/item?id=47806253","title":"Comment on Cloudflare's AI Platform","author":"sf_tristanb","publisher":"Hacker News","date":"2026-04-17","quote":"because Cloudflare AI Gateway is reporting inaccurate/wrong price for flagship models such as Nano Banana 2 and Nano Banana pro (I run production app using those).","summary":"A production operator reports incorrect price estimates for flagship image models despite repeated reports.","claim_ids":["c11"]},{"id":"s10","type":"github_issue","url":"https://github.com/cloudflare/moltworker/issues/74","title":"Authenticated AI Gateway support in Moltworker","author":"daical","publisher":"GitHub","date":"2026-01-30","quote":"When Authenticated Gateway is enabled on the AI Gateway, all requests from Moltworker fail because the required `cf-aig-authorization` header is never sent.","summary":"Concrete client failure when a base-URL integration has no way to add the gateway's second credential header.","claim_ids":["c5"]},{"id":"s11","type":"hn","url":"https://news.ycombinator.com/item?id=47301851","title":"Comment on AI Gateway cache hit rate","author":"idrisitanzil","publisher":"Hacker News","date":"2026-03-08","quote":"I was routing support-bot traffic through Cloudflare AI Gateway and  noticed the cache hit rate was near zero despite the product being  mature.","summary":"A production cache audit found 500 consecutive misses even though 89% of messages collapsed into fewer than 30 intents.","claim_ids":["c7"]},{"id":"s12","type":"hn","url":"https://news.ycombinator.com/item?id=42862073","title":"Comment on AI Gateway geographic egress","author":"maeil","publisher":"Hacker News","date":"2025-01-29","quote":"this made Cloudflare's AI Gateway an unusable product, as they hilariously put a node in HK so you never know when your Anthropic request is randomly going to fail defeating the whole purpose behind the product.","summary":"An operator reports intermittent Anthropic failures caused by gateway traffic egressing through Hong Kong.","claim_ids":["c14"]},{"id":"s13","type":"github_issue","url":"https://github.com/farion1231/cc-switch/issues/2311","title":"Cloudflare AI Gateway authentication support in cc-switch","author":"bdim404","publisher":"GitHub","date":"2026-04-24","quote":"cc-switch currently sends `Authorization: Bearer <key>` for all upstream providers. Cloudflare AI Gateway requires `x-api-key: <anthropic_key>` instead, causing 401 errors when trying to use it as a proxy.","summary":"Concrete Anthropic-native header mismatch and the proposed two-header client behavior.","claim_ids":["c5"]},{"id":"s14","type":"publisher_documentation","url":"https://developers.cloudflare.com/analytics/graphql-api/","title":"Cloudflare GraphQL Analytics API","publisher":"Cloudflare","date":"2026-07-26","quote":"The GraphQL Analytics API is the engine that powers all the product analytics on the Cloudflare dashboard.","summary":"The query surface used to read aiGatewayRequestsAdaptiveGroups for request, token, cost, cache, status, and duration measurements.","claim_ids":["c10"]},{"id":"s15","type":"first_party_measurement","url":"https://miscsubjects.com/a/cloudflare-ai-gateway-setup","title":"Gateway latency A/B probe","publisher":"miscsubjects.com","date":"2026-07-26","quote":"median 0.741 s through the gateway against 0.648 s without","summary":"Harness: six curl time_total runs per arm, one model, one prompt, max_tokens 1, cache bypassed; the gateway-id header was the only changed input.","claim_ids":["c13"]},{"id":"s16","type":"first_party_measurement","url":"https://developers.cloudflare.com/api/resources/ai_gateway/methods/create/","title":"Live gateway configuration and 30-day account measurement","publisher":"Cloudflare API","date":"2026-07-26","quote":"\"rate_limiting_limit\": 120","summary":"Authenticated API read of the measured gateway plus a 30-day GraphQL aggregation: 5,252 account requests, one 429, and gateway-level token and cost totals.","claim_ids":["c1","c10","c12","c8"]},{"id":"s17","type":"first_party_measurement","url":"https://developers.cloudflare.com/ai-gateway/configuration/authentication/","title":"Gateway-host versus REST-host authentication probe","publisher":"Cloudflare","date":"2026-07-26","quote":"\"code\":2009,\"message\":\"Unauthorized\"","summary":"Same token, gateway and model tested against both hosts: provider-native host rejected a token without Run while the REST host returned HTTP 200 and logged the request.","claim_ids":["c4"]},{"id":"s18","type":"first_party_measurement","url":"https://developers.cloudflare.com/ai-gateway/features/caching/","title":"Five-request exact-cache probe","publisher":"Cloudflare","date":"2026-07-26","quote":"miss, hit, hit, miss, miss","summary":"Five controlled requests showed identical bodies hitting after fill and UUID-bearing variants missing; GraphQL supplied cache truth when the REST response omitted cf-aig-cache-status.","claim_ids":["c7"]},{"id":"s19","type":"hn","url":"https://news.ycombinator.com/item?id=46100225","title":"Comment on AI Gateway setup","author":"0xblacklight","publisher":"Hacker News","date":"2025-11-30","quote":"We used cloudflare's AI gateway which is pretty simple. Set one up, get the proxy URL and set it through the env var, very plug-and-play","summary":"Positive operator report that the base-URL setup can be almost frictionless when authentication and provider constraints fit the client.","claim_ids":["c15"]},{"id":"s20","type":"github_issue","url":"https://github.com/cloudflare/ai/issues/476","title":"Custom provider endpoint prepends /v1","author":"matijagrcic","publisher":"GitHub","date":"2026-04-02","quote":"Gateway appears to prepend `/v1` to the upstream path even when the custom provider `base_url` is configured without `/v1`.","summary":"A reproducible custom-provider path mutation and its upstream-observed failure mode.","claim_ids":["c16"]},{"id":"s21","type":"github_issue","url":"https://github.com/cloudflare/ai/issues/617","title":"Dynamic Workers AI route fails on universal endpoint","author":"Aqua-123","publisher":"GitHub","date":"2026-07-14","quote":"A documented `ai-gateway-provider` dynamic route targeting Workers AI fails when it is sent through the AI Gateway universal endpoint.","summary":"A raw-request reproduction showing a dynamic Workers AI route failing on universal while the compatibility endpoint succeeds.","claim_ids":["c17"]}]}