Header Glossary
AI Gateway supports a variety of headers to help you configure, customize, and manage your API requests. This page provides a complete list of all supported headers, along with a short description
| Term | Definition | 
|---|---|
| cf-aig-backoff | Header to customize the backoff type for request retries of a request.  |   
| cf-aig-cache-key | The cf-aig-cache-key-aig-cache-key let you override the default cache key in order to precisely set the cacheability setting for any resource.  |   
| cf-aig-cache-status | Status indicator for caching, showing if a request was served from cache.  |   
| cf-aig-cache-ttl | Specifies the cache time-to-live for responses.  |   
| cf-aig-collect-log | The cf-aig-collect-log header allows you to bypass the default log setting for the gateway.  |   
| cf-aig-custom-cost | Allows the customization of request cost to reflect user-defined parameters.  |   
| cf-aig-event-id | cf-aig-event-id is a unique identifier for an event, used to trace specific events through the system.  |   
| cf-aig-log-id | The cf-aig-log-id is a unique identifier for the specific log entry to which you want to add feedback.  |   
| cf-aig-max-attempts | Header to customize the number of max attempts for request retries of a request.  |   
| cf-aig-metadata | Custom metadataallows you to tag requests with user IDs or other identifiers, enabling better tracking and analysis of your requests.  |   
| cf-aig-request-timeout | Header to trigger a fallback provider based on a predetermined response time (measured in milliseconds).  |   
| cf-aig-retry-delay | Header to customize the retry delay for request retries of a request.  |   
| cf-aig-skip-cache | Header to bypass caching for a specific request.  |   
| cf-aig-step | cf-aig-step identifies the processing step in the AI Gateway flow for better tracking and debugging.  |   
| cf-cache-ttl | Deprecated: This header is replaced by   |   
| cf-skip-cache | Deprecated: This header is replaced by   |   
Settings in AI Gateway can be configured at three levels: Provider, Request, and Gateway. Since the same settings can be configured in multiple locations, the following hierarchy determines which value is applied:
- Provider-level headers: Relevant only when using the Universal Endpoint, these headers take precedence over all other configurations.
 - Request-level headers: Apply if no provider-level headers are set.
 - Gateway-level settings: Act as the default if no headers are set at the provider or request levels.
 
This hierarchy ensures consistent behavior, prioritizing the most specific configurations. Use provider-level and request-level headers for more fine-tuned control, and gateway settings for general defaults.
Was this helpful?
- Resources
 - API
 - New to Cloudflare?
 - Directory
 - Sponsorships
 - Open Source
 
- Support
 - Help Center
 - System Status
 - Compliance
 - GDPR
 
- Company
 - cloudflare.com
 - Our team
 - Careers
 
- © 2025 Cloudflare, Inc.
 - Privacy Policy
 - Terms of Use
 - Report Security Issues
 - Trademark