id (the id returned in
a chat completion). Useful for auditing or fetching cost asynchronously. Free.
Mirrors OpenRouter’s generation endpoint.
The generation id from a prior chat completion response.
Stats are populated by OpenRouter after a generation finishes accounting, so a
lookup immediately after a completion may briefly return
provider_error (404)
until the record is available. For real-time cost you don’t need this endpoint —
every chat completion already returns usage.cost (and Naive credits_used)
inline.