Skip to content
Cloudflare Docs

Costs

Cost metrics are only available for endpoints where the models return token data and the model name in their responses.

Track costs across AI providers

AI Gateway makes it easier to monitor and estimate token based costs across all your AI providers. This can help you:

  • Understand and compare usage costs between providers.
  • Monitor trends and estimate spend using consistent metrics.
  • Apply custom pricing logic to match negotiated rates.

Custom costs

AI Gateway allows users to set custom costs when operating under special pricing agreements or negotiated rates. Custom costs can be applied at the request level, and when applied, they will override the default or public model costs. For more information on configuration of custom costs, please visit the Custom Costs configuration page.