Cloudflare Docs
AI Gateway
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Configuration

Configure your AI Gateway with multiple options and customizations.

  • Caching: Override caching settings on a per-request basis.
  • Fallbacks: Specify model or provider fallback with your Universal endpoint to specify what to do if a request fails.
  • Rate limiting: Rate limiting controls the traffic that reaches your application, which prevents expensive bills and suspicious activity.
  • Custom metadata: Custom metadata in AI Gateway allows you to tag requests with user IDs or other identifiers, enabling better tracking and analysis of your requests. Metadata values can be strings, numbers, or booleans, and will appear in your logs, making it easy to …
  • Manage gateways: You have several different options for managing an AI Gateway.