Understanding Limit Details
You can call the Get Limit Details API to see the status of the limit. This page describes the response object and how to interpret what it represents.
{
"limit_creation_timestamp": "2024-09-01T23:56:55.966655Z",
"limit_id": "295859",
"limit_name": "OpenAI quickstart allow limit",
"limit_type": "allow",
"limit_update_timestamp": "2024-09-01T23:56:56.440000Z",
"currency": "usd",
"max": "12.5",
"threshold": "0.8",
"totals": {
"cost": {
"input": {
"base": "0.000007"
},
"output": {
"base": "0.000006"
},
"total": {
"base": "0.000013",
"overrun_base": "0.0"
}
},
"requests": {
"ok": 1,
"exceeded": 0,
"failed": 0,
"blocked": 0,
"blocked_external": 0,
"total": 1
}
},
"limit_tags": [
"example_limit"
]
}
Cost
The cost
object stores the total cost in USD of all of the successful requests that were made with this limit_id
specified.
The cost is split between input
, output
, and total
, where total
is the sum of input
and output
.
base
and overrun_base
base
and overrun_base
The input
and output
objects provide the cost of the input and output units, across all Categories and Resources used, for all of the successful requests.
The base
cost represents the raw cost of the units as determined by the Resource.
The overrun_base
is how much of the base
cost exceeded the limit's max
, known as the Limit Overrun.
For example, if a limit has:
max
of $10.00input
base
cost of $7.30output
base
cost of $5.21
Then the overrun_base
is:
- $7.30 + $5.21 - $10.00 = $2.51
Requests
The requests
object provides the number of requests and their status types for which this limit was passed in. Note that only successful requests are considered for calculating the costs against the limit.
Updated 3 months ago