Skip to main content
GET
/
admin
/
api
/
v1
/
usage
/
models
Get usage breakdown by model
curl --request GET \
  --url https://gomodel.example.com/admin/api/v1/usage/models \
  --header 'Authorization: <api-key>'
[
  {
    "input_cost": 123,
    "input_tokens": 123,
    "model": "<string>",
    "output_cost": 123,
    "output_tokens": 123,
    "provider": "<string>",
    "provider_name": "<string>",
    "total_cost": 123
  }
]

Authorizations

Authorization
string
header
required

Query Parameters

days
integer

Number of days (default 30)

start_date
string

Start date (YYYY-MM-DD)

end_date
string

End date (YYYY-MM-DD)

user_path
string

Filter by tracked user path subtree

cache_mode
string

Cache mode filter: uncached, cached, all (default uncached)

Response

OK

input_cost
number
input_tokens
integer
model
string
output_cost
number
output_tokens
integer
provider
string
provider_name
string
total_cost
number