X-API-Key header. See API Reference for authentication and the standard 401 / 403 / 429 / 500 error shapes shared by every endpoint on this page.
An API key reads its own workspace. To cover several workspaces, call these endpoints once with each workspace’s key.
A run counts toward the range it was created in, together with all of its actions. Billing & usage counts each action when it happens, so the two can differ slightly for runs in progress at either end of a range.
Get Usage Totals
Returns the totals for every flow run your workspace created in the range.GET
/api/v1/usage — Returns 200 OKQuery Parameters
string
required
Start of the range, inclusive. An ISO 8601 date or timestamp, read as UTC when it has no offset.
string
required
End of the range, exclusive. Must be after
start.Example Request
Response Fields
string
Start of the range, as an ISO 8601 UTC timestamp.
string
End of the range, as an ISO 8601 UTC timestamp.
integer
Flow runs created in the range.
number
Total run time of the finished runs, in seconds.
integer
AI actions taken by those runs:
uncached_action_count plus cached_action_count.integer
AI actions that were not replayed from cache.
integer
AI actions replayed from cache. These cost 10% of an uncached action. See Run Caching.
Example Response
Errors
List Run Usage
Returns the runs behind the totals, oldest first, each with its own usage and a link to the run in the dashboard.GET
/api/v1/usage/runs — Returns 200 OKQuery Parameters
string
required
Start of the range, inclusive. An ISO 8601 date or timestamp, read as UTC when it has no offset.
string
required
End of the range, exclusive. Must be after
start.integer
default:"100"
Runs per page, from 1 to 500.
string
The
run_id of the last run on the previous page. Returns the runs listed after it. Keep start and end the same while paging: a run outside the range still marks a position, so you get the runs in the range created after it.Example Request
Response Fields
array
One page of runs.
boolean
Whether more runs follow this page. If
true, request the next page with starting_after set to the last run_id in runs.