Skip to content
AISpendbook

Gateways and telemetry · Read with a key

Cloudflare AI Gateway

Request logs from one Cloudflare AI Gateway: model, provider, tokens and cf-aig-metadata, written as request telemetry and priced by us. Cloudflare's cost estimate is kept for comparison only; cached responses are skipped.

How data moves
AI Spendbook reads it on a schedule with a key, token or read-only role you give it.
Credential
API key or token
What it covers
request telemetry
Money
An estimate priced by AI Spendbook, never a bill
Runs
each scheduler run (daily on the hosted deployment)
Freshness
Logs appear once the gateway has stored them; the trailing day is re-read.
History on first sync
Up to 365 days
Not included
billed cost, cache tokens
Status
Built from the vendor's public documentation and tested with recorded responses. Not yet run against a live account.

Set it up

  1. In the Cloudflare dashboard create an API token with the AI Gateway Read permission for the account.
  2. Copy the account id and the gateway id (the gateway's name in the AI Gateway list).
  3. Send customer_id and feature in the cf-aig-metadata header to attribute requests.
  4. We call GET /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs only. Logs are read 50 per request, the most Cloudflare allows.

What it needs

A Cloudflare API token with AI Gateway Read on the account, and the gateway id.

Every connector, by family

Start with your own numbers.

Every plan is free during launch. No credit card.