client.usage
client.usage — the usage operations.
On AsyncKindgi every method is the same, awaited.
client.usage.read()
Section titled “client.usage.read()”read( *, from_: str, to: str, group_by: str | None = None, kind: str | None = None, class_: str | None = None, state: str | None = None, limit: int | None = None, cursor: str | None = None, project_id: str | UUID | None = None, timeout: float | None = None,) -> UsagePageRead your workspace's usage. GET /v1/usage
Your workspace's usage records aggregated by the dimensions in groupBy: each group's count, the sum of its quantities, and its first and last times. Never a record's content. Over the projects you may read: a tenant admin's covers every project and the records with none; anyone else's, only the projects they may read, and one they can't read is absent rather than an error. watermark: every record at or before it is in the answer, so re-read a window until its watermark is past the window's end; every page of one read carries the same watermark. A runtime that doesn't count usage (KINDGI_USAGE_METERING unset or off) answers 404. Model-call cost is on /v1/cost.