The Usage API returns one project's usage for a calendar month, or for a cycle of its monthly request quota. Use it to show usage inside your own app, check how close a project is to an allowance, or reconcile what you bill your own customers.
It uses the same project API key as /v1/ai (Authorization: Bearer mr_live_…) and only ever returns that key's project.
Get usage for a month
1GET /v1/usage?month=2026-10| Parameter | Default | Notes |
|---|---|---|
month | the current month | YYYY-MM, in UTC. The current month and the 24 before it |
1{2 "project_id": "7c2e5a0b-3f41-4f7e-9d0a-6a1b2c3d4e5f",3 "month": "2026-10",4 "period_start": "2026-10-01T00:00:00Z",5 "period_end": "2026-11-01T00:00:00Z",6 "billable_requests": 3240,7 "requests": 3301,8 "failed_requests": 12,9 "prompt_tokens": 4120000,10 "completion_tokens": 610000,11 "total_tokens": 4730000,12 "cache_read_tokens": 2950000,13 "cache_write_tokens": 180000,14 "reasoning_tokens": 95000,15 "price": 12.48,16 "active_sessions": 980,17 "session_messages_appended": 412,18 "session_signals": 1630,19 "tool_rounds": 540,20 "tool_calls": 610,21 "by_day": [22 { "date": "2026-10-01", "billable_requests": 112, "requests": 115, "session_messages_appended": 14, "session_signals": 60, "tool_rounds": 18, "tool_calls": 21 },23 { "date": "2026-10-02", "billable_requests": 98, "requests": 98, "session_messages_appended": 9, "session_signals": 41, "tool_rounds": 12, "tool_calls": 15 }24 ],25 "updated_at": "2026-10-27T09:14:00Z"26}| Field | Description |
|---|---|
billable_requests | Requests that count toward your plan, counted the same way as billing |
requests | All requests, including Playground and test-mode runs |
failed_requests | Requests that ended in an error |
prompt_tokens, completion_tokens, total_tokens | Tokens across all requests. prompt_tokens includes cached input and completion_tokens includes reasoning |
cache_read_tokens, cache_write_tokens | Of prompt_tokens, the input read from and written to the provider's prompt cache |
reasoning_tokens | Of completion_tokens, the tokens the model spent reasoning (thinking) |
price | Estimated provider cost in USD, from ModelRiver's model pricing |
active_sessions | Distinct sessions with at least one request in the month |
session_messages_appended | Messages appended to sessions without calling a model. Not billed, not in requests |
session_signals | Signals sent to sessions. Not billed, not in requests |
tool_rounds | Model rounds run by requests to workflows with hosted tools. Each one is also counted in billable_requests |
tool_calls | Calls made to your tool endpoints by those requests. A call to a tool that changes something counts once it is sent; a declined or expired call doesn't count. Not billed |
by_day | Every day of the month up to today (UTC), including days with no requests |
updated_at | When these numbers were counted |
What counts as a billable request
- Each
/v1/airequest counts once, even when failover retried it on another provider. - A request to a workflow with hosted tools counts once per model round. Tool calls don't count.
- Playground and test-mode runs don't count.
- Messages added with
POST /v1/sessions/:id/messagesdon't count: they never call a model.
How current it is
The current month includes requests made up to a minute ago. Results are cached for about a minute per project and month, so polling faster than that returns the same numbers; check updated_at.
Usage for earlier months stays available after request logs are removed at the end of your plan's retention period. A request that finishes late, such as an async callback, can still change the last few days of a month for up to a week.
Errors
A month that isn't YYYY-MM, is in the future, or is more than 24 months back returns 422:
1{ "error": "invalid_month", "message": "month must be YYYY-MM, from 2024-10 to 2026-10" }A missing or invalid API key returns 401.
Get usage for a quota cycle
1GET /v1/usage?cycle=current| Parameter | Notes |
|---|---|
cycle | current, previous, or a YYYY-MM-DD date inside an earlier cycle (up to 24 cycles back). Pass cycle or month, not both |
The response has the same fields as a month, without month, plus:
1{2 "period_start": "2026-10-30T00:00:00Z",3 "period_end": "2026-11-30T00:00:00Z",4 "cycle_anchor_at": "2026-10-30T00:00:00Z",5 "used": 640,6 "quota": 10007}| Field | Description |
|---|---|
period_start, period_end | The cycle; the count starts again at period_end |
cycle_anchor_at | Cycles start on this day of the month |
used | Billable requests in the cycle, the number the quota is checked against |
quota | The project's monthly request quota, or null when it has none |
active_sessions | As for a month, or null when the cycle starts before logs your plan still keeps |
A project without a quota still has cycles, anchored on the day it was created. A cycle that isn't valid returns 422 with "error": "invalid_cycle".
Monthly request quotas
On paid plans, an organization owner or admin can give a project a monthly request quota in Project settings → Monthly request quota, with the day its cycles start. Each cycle starts at 00:00 UTC on that day of the month, or on the last day of shorter months: a project that starts on Oct 30 renews on Nov 30, Dec 30, Jan 30, Feb 28 and Mar 30.
The quota counts billable requests (see above), including cache hits and failed requests. Once a cycle's quota is used, production requests to /v1/ai, /v1/ai/async and the OpenAI-compatible endpoints fail with 402 until the next cycle starts. Test-mode runs and the Playground still work:
1{2 "error": {3 "code": "project_quota_exceeded",4 "type": "project_quota_exceeded",5 "scope": "project",6 "message": "This project has used its monthly quota of 1000 requests. It renews at 2026-11-30T00:00:00Z.",7 "quota": 1000,8 "used": 1000,9 "period_start": "2026-10-30T00:00:00Z",10 "period_end": "2026-11-30T00:00:00Z"11 }12}Refused requests don't count toward the quota. The count is cached for about 10 seconds, so a burst of concurrent requests can go slightly over it.
Next steps
- Sessions API: Read, extend and follow conversations
- Authentication: Create and rotate API keys
- Error handling: Status codes and retries