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
- (Updated) [Reminder] Microsoft Teams Premium Self-Service Trials (Originally announced in MC670435) [MC1181209]
![(Updated) [Reminder] Microsoft Teams Premium Self-Service Trials (Originally announced in MC670435) [MC1181209] 2 pexels pixabay 68661](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Dynamics 365 Sales – Improve opportunity context with AI-based data enrichment [MC1254454]
![Dynamics 365 Sales - Improve opportunity context with AI-based data enrichment [MC1254454] 3 pexels pixabay 147411](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Dynamics 365 Sales – Modern, in-flow email template picker for Sequences [MC1254451]
![Dynamics 365 Sales - Modern, in-flow email template picker for Sequences [MC1254451] 4 pexels mccutcheon 1148998](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Retirement of the Semi-Annual Enterprise Channel option in the Office Customization Tool [MC1249427]
![(Updated) Retirement of the Semi-Annual Enterprise Channel option in the Office Customization Tool [MC1249427] 5 pexels olly 3761504](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)

![(Updated) [Reminder] Microsoft Teams Premium Self-Service Trials (Originally announced in MC670435) [MC1181209] 2 pexels pixabay 68661](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-pixabay-68661-150x150.webp)
![Dynamics 365 Sales - Improve opportunity context with AI-based data enrichment [MC1254454] 3 pexels pixabay 147411](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-147411-150x150.webp)
![Dynamics 365 Sales - Modern, in-flow email template picker for Sequences [MC1254451] 4 pexels mccutcheon 1148998](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-mccutcheon-1148998-150x150.webp)
![(Updated) Retirement of the Semi-Annual Enterprise Channel option in the Office Customization Tool [MC1249427] 5 pexels olly 3761504](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-olly-3761504-150x150.webp)
![(Updated) Retirement of the Semi-Annual Enterprise Channel option in the Office Customization Tool [MC1249427] 7 (Updated) Retirement of the Semi-Annual Enterprise Channel option in the Office Customization Tool [MC1249427]](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-olly-3761504-96x96.webp)