MeterQueryRequest

object

A meter query request.

fromstring(date-time)

The start of the period the usage is queried from.

Example:2023-01-01T01:01:01.001Z

tostring(date-time)

The end of the period the usage is queried to.

Example:2023-01-01T01:01:01.001Z

granularitystring

The size of the time buckets to group the usage into.
If not specified, the usage is aggregated over the entire period.

Allowed values:PT1MPT1HP1DP1M

time_zonestring

The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).
The time zone is used to determine the start and end of the time buckets.
If not specified, the UTC timezone will be used.

Default:UTC

group_by_dimensionsarray[string]

The dimensions to group the results by.

<= 100 items

Example:model, type

filtersobject

Filters to apply to the query.

Show Child Parameters
Example

MeterQueryResult

object

Meter query result.

fromstring(date-time)

The start of the period the usage is queried from.

Example:2023-01-01T01:01:01.001Z

tostring(date-time)

The end of the period the usage is queried to.

Example:2023-01-01T01:01:01.001Z

dataarray[object]required

A row in the result of a meter query.

Example:{"value":"12.3456","from":"2023-01-01T00:00:00Z","to":"2023-01-02T00:00:00Z","dimensions":{"customer_id":"01G65Z755AFWAKHE12NY0CQ9FH","model":"gpt-4-turbo","type":"input"}}

Show Child Parameters
Example

MeterQueryRow

object

A row in the result of a meter query.

valuestringrequired

The aggregated value.

Match pattern:^\-?[0-9]+(\.[0-9]+)?$

fromstring(date-time)required

The start of the time bucket the value is aggregated over.

Example:2023-01-01T01:01:01.001Z

tostring(date-time)required

The end of the time bucket the value is aggregated over.

Example:2023-01-01T01:01:01.001Z

dimensionsobjectrequired

The dimensions the value is aggregated over.
subject and customer_id are reserved dimensions.

Example

PricePagePaginatedResponse

object

Page paginated response.

dataarray[object]required

An LLM cost price record, representing the cost per token
for a specific model from a specific provider.

Show Child Parameters
metaobjectrequired

returns the pagination information

Show Child Parameters
Example

Query String Filter

object

A query filter for a string attribute.
Operators are mutually exclusive, only one operator is allowed at a time.

eqstring

The attribute equals the provided value.

neqstring

The attribute does not equal the provided value.

inarray[string]

The attribute is one of the provided values.

>= 1 items<= 100 items

ninarray[string]

The attribute is not one of the provided values.

>= 1 items<= 100 items

containsstring

The attribute contains the provided value.

ncontainsstring

The attribute does not contain the provided value.

andarray[object]

A query filter for a string attribute.
Operators are mutually exclusive, only one operator is allowed at a time.

>= 1 items<= 10 items

Show Child Parameters
orarray[object]

A query filter for a string attribute.
Operators are mutually exclusive, only one operator is allowed at a time.

>= 1 items<= 10 items

Show Child Parameters
Example