Skip to main content
Every bit of billable work in Roark (simulations, metric evaluations, transcription) is attributed to the project that incurred it. You can read that attribution three ways:
  • Billing screen (Settings → Billing): a per-project and per-type spend breakdown for the current billing period.
  • CSV export: the “Export CSV” button on that breakdown downloads exactly what you see, grouped by project or by type.
  • API (GET /v1/usage): the same per-project figures over a date range you choose, for feeding a warehouse, a finance report, or a per-team chargeback.
This page covers the API.

Authentication

GET /v1/usage is organization-scoped: the per-project breakdown spans every project in your organization, so it is authenticated by an Organization API key (the same credential family used for org provisioning), not a project key. The key must carry the usage:read permission. An org Owner or Admin creates a key under Settings → Organization → API keys; new keys are minted with the full organization permission set, so they include usage:read.
Cost visibility is a deliberately separate permission from project access. If you are using an organization key created before usage reporting launched, re-mint it so it carries usage:read; an older key returns 403 on this endpoint.

Endpoint

Query parameters

Example request

Example response

Response fields

  • totalUsdMicros / totalUsd: total billable spend across the organization (or the single project, when projectId is set) over the window. The total is the sum of projects.
  • projects[]: per-project billable spend, highest first. Only projects with spend in the window appear.
  • projectName: the project’s current name, or null if the project no longer exists.
  • Micros vs dollars: amountUsdMicros is the exact, canonical integer (1,000,000 = $1, the unit the billing ledger stores). Use it to sum and reconcile against an invoice. amountUsd is the same figure as a convenience float for display.
Amounts are billable spend only. Internal costs Roark absorbs on your behalf are never included, so these figures match what you are charged.

Errors

Paging longer histories

The 366-day ceiling keeps a single request bounded. To report across a longer period, page the window month by month (or quarter by quarter) and sum the totalUsdMicros from each response.