Skip to Content

checkUsageWindow()

function checkUsageWindow(query, context): void;

Parameters

query

account?

string = ...

customer?

string = ...

A customer id, or OWNER_CUSTOMERS_KEY for the user’s own customers.

failed?

"true" | "false" = ...

Whether the request was recorded as an error.

from

string = ...

ISO instants: requests finished at or after from and before to.

mode

"live" | "sandbox" = ...

model?

string = ...

outcome?

| "completed" | "interrupted" | "failed" | "pending" | "rejected" | "rate_limited" | "usage_limit_reached" | "suspended" | "unknown_failure" = ...

product?

string = ...

project?

string = ...

Filters, each named as its grouping is.

session?

string = ...

The client’s session id, such as Codex’s.

timeZone

string = ...

The IANA time zone whose days day groups by.

to

string = ...

context

$RefinementCtx<{ account?: string; customer?: string; failed?: "true" | "false"; from: string; mode: "live" | "sandbox"; model?: string; outcome?: | "completed" | "interrupted" | "failed" | "pending" | "rejected" | "rate_limited" | "usage_limit_reached" | "suspended" | "unknown_failure"; product?: string; project?: string; session?: string; timeZone: string; to: string; }>

Last updated on