Expand description
Usage and billing for an API key: the bodies of GET /usage and GET /usage/sessions.
Times are UTC, durations are wall time in milliseconds, and prices are US dollars. A session’s compute counts toward the day it ended.
Structs§
- Bundle
Build Usage - Bundle-build usage for the window.
- Compute
Totals - A session contributes wholly to the window — or
UsageBucket— it ended in, even when it ran across the boundary. - Session
Counts - Point counts by outcome, not session-deduplicated, so the three need not
balance: a pre-start failure has no
started, a session moving between server instances re-emits it. Billing uses the compute totals, which derive only from the terminal points. - Session
Usage - One session that ran under the key, as its terminal event reported it.
- Session
Usage Page - Response body of
GET /usage/sessions. - Usage
Bucket - One UTC day of a
UsageReport, covering(start, end].endis the following midnight, except for a last bucket that ends at the report’suntil. - Usage
Pricing - The billing rates a report’s totals are priced at, in US dollars.
- Usage
Report - Response body of
GET /usage.
Constants§
- BUCKET_
SPAN - What one whole
UsageBucketspans.