Header Glossary

Last updated Sep 15, 2026 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-dlp A response header returned when a DLP policy matches a request or response. Contains JSON with the action taken (Flag or Block), matched policy IDs, matched profile IDs, and detection entry IDs.
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. Treat it as an opaque string.
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-no-wholesale Prevents Unified Billing fallback for a third-party provider request when set to true. The request must use provider credentials supplied with the request or stored on the gateway.
cf-aig-request-id The cf-aig-request-id response header identifies the request. For a request that AI Gateway answers in a single step, it has the same value as cf-aig-log-id.
cf-aig-request-timeout Header to set a request timeout (measured in milliseconds). If the provider does not respond within this time, the request returns an error.
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 The cf-aig-step response header identifies which step in a request flow successfully processed the request, useful for tracking and debugging.
cf-cache-ttl Deprecated: This header is replaced by cf-aig-cache-ttl. It specifies cache time-to-live.
cf-skip-cache Deprecated: This header is replaced by cf-aig-skip-cache. It bypasses caching for a specific request.

Configuration hierarchy

Settings in AI Gateway can be configured at two levels: Request and Gateway. Since the same settings can be configured in multiple locations, the following hierarchy determines which value is applied:

  1. Request-level headers: Headers included in individual requests take precedence over gateway-level settings.
  2. Gateway-level settings: Act as the default if no headers are set at the request level.

This hierarchy ensures consistent behavior, prioritizing the most specific configurations. Use request-level headers for fine-tuned control, and gateway settings for general defaults.

Some restrictive settings are additive. The cf-aig-no-wholesale header can require provider credentials for a third-party provider request, but it cannot turn off Require provider credentials when that gateway setting is on.

Was this helpful?

YesNo

On this page

Header Glossary - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai-gateway/glossary/#page","headline":"Header Glossary","description":"Reference all supported AI Gateway headers for configuring, customizing, and managing API requests.","url":"https://developers.cloudflare.com/ai-gateway/glossary/","inLanguage":"en","image":"https://developers.cloudflare.com/ai-gateway/glossary/og.png?v=e6eafc5cbbff6e33","dateModified":"2026-09-15","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


title: List gateways

Skip to content

API Reference

AI Gateway

Copy Markdown

Open in ClaudeOpen in ChatGPTOpen in Cursor


Copy MarkdownView as Markdown