Skip to main content
GET
New usage may take time to appear. For your remaining included and purchased credits, use Balance. Unsupported or repeated query parameters return 400. Errors follow Ollama’s JSON error format.

Time ranges

Every range ends at the time of the request. For example, at 02:30 UTC on October 1, 24h starts at 02:00 UTC on September 30. It returns 24 complete hourly buckets followed by the current 02:00–02:30 bucket. The 7d and 30d ranges return seven and thirty complete days, followed by today so far. Buckets appear in chronological order, including zeroes for hours or days with no recorded requests. The final bucket covers the current hour or day and has partial: true. All timestamps are in UTC. Each from is inclusive and each until is exclusive.

Usage totals and buckets

totals summarizes usage across the entire range. buckets breaks that usage into hours or days. granularity is set automatically: hour for 24h and day for 7d and 30d. The top-level from and until describe the entire range; each bucket has its own boundaries. partial indicates whether the hour or day is still in progress, rather than whether all usage has been recorded.
For legacy plans, only request counts are available. If a bucket or total includes legacy requests, cost and token counts are omitted.

Rate limits

This endpoint allows 10 requests per minute per user, shared across API keys and devices. We recommend polling once per minute. A 429 response includes a Retry-After header with the number of seconds to wait before retrying.

Team usage

By default, everyone sees their own usage (scope=self). Team admins can use scope=team to see usage for the whole team:

Coming soon

We plan to add custom time ranges, usage breakdowns by model and API key, and breakdowns by team member for team admins.

Reference

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

range
enum<string>
default:7d

Completed UTC hours or days to include, plus the current partial hour or day.

Available options:
24h,
7d,
30d
scope
enum<string>
default:self

Your requests, or your team's requests. Team scope requires being a team admin.

Available options:
self,
team

Response

Usage for the selected range and scope.

range
enum<string>
required

Selected time range.

Available options:
24h,
7d,
30d
scope
enum<string>
required

Selected usage scope.

Available options:
self,
team
granularity
enum<string>
required

Set automatically: hour for 24h, day for 7d and 30d.

Available options:
hour,
day
from
string<date-time>
required

Start of the range in UTC, inclusive.

until
string<date-time>
required

End of the range in UTC, exclusive.

totals
object
required

Usage across the entire range.

buckets
object[]
required

Usage in chronological order, including buckets with no recorded requests.