Guides
Request-level logs
Why request-level logs matter for AI API billing
Request-level logs turn API usage into a ledger. Teams can inspect every completed deduction and connect it to a key, model, token count, and request id.
What a useful log row includes
A useful log row includes request id, time, API key, model, input tokens, output tokens, cached tokens, status, and billed amount.
Why logs reduce support work
Support can inspect the exact request rather than guessing from aggregate usage.
- Find expensive prompts
- Separate failures from successes
- Export CSV data
Logs and privacy
For most teams, billing logs should focus on metadata and usage meters. Full prompt storage is not required for basic billing auditability.
FAQ
Are logs the same as analytics?
No. Analytics summarizes trends. Request-level logs are the source ledger.
What should happen to duplicate request ids?
A request id should be billable at most once.