api.valarhq.ai.
Base URL
Authentication
Pass your API key as a Bearer token in theAuthorization header on every request.
The key here is identical to the one used by the inference API at
api.valarhq.ai. Generate and manage keys from the Valar
dashboard.Endpoints
The complete reference for each
GET /v1/usage route, covering parameters,
response shapes, error formats, and headers.Organization, workspace, and API key costs
By default,/v1/usage and /v1/usage/breakdown include all workspaces and API
keys in your organization, not just the workspace or key you authenticate with.
- Add
workspace_id=ws_...to either endpoint to filter costs to one workspace. - Add
key_id=...to either endpoint to filter costs to one API key. - Add
group_by=workspaceorgroup_by=keyto/v1/usage/breakdownto get IDs, names, totals, and per-model costs for each workspace or each API key in one response.
Expect a small lag in usage data - it is not reported in real time.
usage.cost.