BillingUsageEvent
class mint.types.BillingUsageEvent ( BaseModel )¶
An hourly billing record. The outer fields identify who and what the usage belongs to; event_info contains its type and quantity. Its .type field identifies which variant of the tagged union is present.
Fields:
- bucket_start ( datetime ): Inclusive start of the UTC hour bucket
- bucket_end ( datetime ): Exclusive end of the UTC hour bucket
- base_model ( str | None ): Base model the usage was billed against (None when unknown, e.g. storage from before base-model stamping)
- user_id ( str | None ): Organization-user urn of the user that created the session the usage is attributed to
- user_name ( str | None ): Display name of
user_id, as self-reported during onboarding - session_id ( str | None ): The session the usage is attributed to: for sampling the session that
issued the requests, for training the session that created the training
run. None for events without a session (storage, usage from before
session tagging). Session user_metadata is available in
BillingUsageResponse.sessions, keyed by this id. - project_id ( str | None ): Project this usage belongs to, resolved from the current project
associated with the session identified by
session_id - event_info ( BillingEventInfo ): What kind of usage this is and its quantity; dispatch on
event_info.type
Referenced by¶
- RestClient.get_billing_usage
- mint.types.BillingUsageResponse