Get Token Usage Cost Over Time
GET/api/v2/cost/organizations/:organization_id/stats/cost-over-time
Returns the LLM cost per UTC day, in USD. Days without any usage are left out.
Set group_by to split each day's cost by model, workspace, pipeline, deployment, provider, or API key. The group_limit groups with the most cost over the whole range get their own points, the rest are merged into an other group, and usage with no value for the dimension goes into an unattributed group, so a day's points always add up to its total. groups lists them in that order.
Filter by workspace_id to get one workspace's cost. You need cost read access in that workspace. Omitting workspace_id covers the whole organization and requires the organization admin role.
Request
Responses
- 200
- 422
Successful Response
Validation Error
Was this page helpful?