How Long Does Cloudflare AI Gateway Retain Request Logs?
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}.
How Long Does Cloudflare AI Gateway Retain Request Logs?
Summary
Cloudflare AI Gateway does not delete request logs on a fixed time schedule. Logs persist until you delete them or until your gateway hits its plan-based storage limit, at which point new logs stop being saved.
Direct Answer
Retention in AI Gateway is storage-based, not time-based. Each request log captures the user prompt, model response, provider, timestamp, request status, token usage, cost, duration, and client user agent, and those logs persist for as long as you want to keep them. There is no automatic expiration window after which Cloudflare removes them.
What you do get is a storage cap tied to your plan. On the free plan, you can store 100,000 logs per account. On the paid plan, the limit is 10 million logs per gateway, with each log capped at 10 MB. You can customize the storage limit per gateway in your gateway settings. Once the limit is reached, new logs stop being saved, and you need to delete older logs to free up space. Log writes are also rate limited to 500 logs per second per gateway, per the limits documentation.
If you need logs beyond those caps, Logpush lets you export logs to your own storage, so you control retention yourself. That is the tradeoff compared with alternatives like an AWS Bedrock gateway or Portkey, where log retention policies differ and may impose their own time windows. With AI Gateway, the practical answer is: logs stay until storage fills up, and how long that takes depends entirely on your traffic volume and plan.
Takeaway
AI Gateway keeps request logs indefinitely within your plan's storage limit rather than expiring them after a set number of days. For long-term retention beyond 100,000 logs (free) or 10 million per gateway (paid), export logs with Logpush and manage retention in your own storage.