AI Gateway now supports the cf-aig-collect-log-payload header, which controls whether request and response bodies are stored in logs. By default, this header is set to true and payloads are stored alongside metadata. Set this header to false to skip payload storage while still logging metadata such as token counts, model, provider, status code, cost, and duration.
This is useful when you need usage metrics but do not want to persist sensitive prompt or response data.
curl https://gateway.ai.cloudflare.com/v1/$ACCOUNT_ID/$GATEWAY_ID/openai/chat/completions \ --header "Authorization: Bearer $TOKEN" \ --header 'Content-Type: application/json' \ --header 'cf-aig-collect-log-payload: false' \ --data '{ "model": "gpt-4o-mini", "messages": [ { "role": "user", "content": "What is the email address and phone number of user123?" } ] }'For more information, refer to Logging.
Source: Cloudflare
Latest Posts
- AI Gateway – Log AI Gateway request metadata without storing payloads

- (Updated) Build SharePoint automations with Workflows—now aligned with the Teams experience [MC1138798]
![(Updated) Build SharePoint automations with Workflows—now aligned with the Teams experience [MC1138798] 3 pexels brett sayles 2516539](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Microsoft 365 Copilot: Navigation refresh in the M365 Copilot app [MC1187677]
![(Updated) Microsoft 365 Copilot: Navigation refresh in the M365 Copilot app [MC1187677] 4 pexels pixabay 158163](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Outlook: Support for recommended and automatically applied sensitivity labels in Outlook for iOS and Android [MC1247891]
![(Updated) Outlook: Support for recommended and automatically applied sensitivity labels in Outlook for iOS and Android [MC1247891] 5 yellow 8622786 1920](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)


![(Updated) Build SharePoint automations with Workflows—now aligned with the Teams experience [MC1138798] 3 pexels brett sayles 2516539](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-brett-sayles-2516539-150x150.webp)
![(Updated) Microsoft 365 Copilot: Navigation refresh in the M365 Copilot app [MC1187677] 4 pexels pixabay 158163](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-158163-150x150.webp)
![(Updated) Outlook: Support for recommended and automatically applied sensitivity labels in Outlook for iOS and Android [MC1247891] 5 yellow 8622786 1920](https://mwpro.co.uk/wp-content/uploads/2025/06/yellow-8622786_1920-150x150.webp)