Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Skip to Content
API ReferenceBilling and usageUsage

Get per-day spend over a trailing window

Returns the org's spend per UTC day for the last 1 to 90 days (default 7), split into GPU model, CPU, and Inference segments, plus the prior window's total. This is what the dashboard spend chart shows. Compute cost is split at UTC day boundaries and inference charges land on the day they were billed. Read-only: costs are priced the same way your bill is, never re-priced.

Required permission

Requires the usage.read permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl usage daily get
GET
/v1/orgs/{orgId}/usage/daily

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string

Query Parameters

days?integer
Range1 <= value <= 90
Default7

Response Body

OK

application/json
  1. response
daily*array<>

one point per day, oldest first, zero-filled so the series is continuous

previousCents*integer

total spend in the same-length window immediately before this one

previousSegments*array<>
Example Request
curl -X GET 'https://api.openrelay.inc/v1/orgs/string/usage/daily'
Example Response
{  "daily": [    {      "date": "string",      "cents": 0,      "segments": [        {          "key": "string",          "cents": 0        }      ]    }  ],  "previousCents": 0,  "previousSegments": [    {      "key": "string",      "cents": 0    }  ]}