Skip to main content
GET
Get usage

Authorizations

Authorization
string
header
required

Create an API key in the console.

Query Parameters

days
integer
default:30
Required range: 1 <= x <= 90
timezone
string
default:UTC
Maximum string length: 64
model
string | null
Maximum string length: 128
api_key_id
string | null
Maximum string length: 64
source
string | null
Pattern: ^(api|console)$
project
string | null

Count only this project's usage, by its id. Without it, you get all the usage you can see: the whole organisation's, or your projects' if an owner limited you to some. A project's API key sees its own project alone.

Maximum string length: 64

Response

Successful Response

days
integer
required
start
string
required
end
string
required
timezone
string
required
totals
UsageTotals · object
required
previous
UsageTotals · object
required
daily
DailyUsage · object[]
required
by_model
ModelUsage · object[]
required
by_api_key
KeyUsage · object[]
required
laboratory
LaboratoryUsage · object
required

Laboratory spend in the period. The model, key and source filters don't apply to it. The other fields count inference only, so evaluation predictions are here instead.