What CostGraph scrapes
APISIX only starts reporting LLM metrics after the first AI request passes
through it, so an empty scrape before any traffic is expected.
How the metrics map
Both becomecostgraph_gen_ai_usage_total,
with the direction set by which metric the value came from:
The unit is always
tokens.
Attribute usage to your customers
Nothing to configure. Give each customer its own APISIX consumer; theconsumer
label is already on every LLM metric, because consumers are APISIX’s own auth
identities.
AI gateways
Connecting, pricing, and sending usage yourself.