Get the org's on-demand inference series
Requests, error rate, latency and time-to-first-token percentiles, and tokens for the org's online on-demand inference over 1h, 6h, 24h, or 7d. Every series shares one time grid, and `models` lists the models with traffic in the range. Without `model` every series is the org total across its on-demand models. Batch and async calls are not counted. Every series also carries a whole-range figure, and the per-point counts add up to it. Data appears within a minute of the org's first on-demand request. These are display metrics, not billing: spend is in the daily usage endpoint.
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 inference-series getapiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
orgId*stringrange?stringthe range to read; 1h when absent
"1h""1h""6h""24h""7d"model?stringa public model id to filter to
1 <= length <= 256Series
application/json- response
model?stringthe public model id every series is filtered to; absent for the org total across models
models*array<string>the public model ids with on-demand traffic in the range, sorted
range*string"1h""6h""24h""7d"start*stringthe first grid point
date-timeend*stringthe last grid point
date-timestepSeconds*integerpointCount*integerthe length of every series' values
metrics*Every chart, always all six. requests: success and error per second. errors: client_error, rate_limited and server_error, each as a share of all requests. latency (request start to last byte) and ttft (streaming requests only): p50, p90, p95 and p99 in seconds. tokens: per second by kind (input, cached_input, cache_write, output), only the kinds metered in the range. concurrency (always sent; optional for clients of older answers): requests in flight, averaged over each point's step, as series in_flight. A request is counted when it finishes, its whole duration in that step, so a point can read above the endpoint's capacity when long requests finish together; its window, the average over the whole range, is the steady figure.
curl -X GET 'https://api.openrelay.inc/v1/orgs/string/inference/series'{ "model": "string", "models": [ "string" ], "range": "1h", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "stepSeconds": 0, "pointCount": 0, "metrics": { "requests": { "unit": "requests_per_second", "series": [ { "key": "string", "values": [ 0.1 ], "window": 0.1 } ] }, "errors": { "unit": "requests_per_second", "series": [ { "key": "string", "values": [ 0.1 ], "window": 0.1 } ] }, "latency": { "unit": "requests_per_second", "series": [ { "key": "string", "values": [ 0.1 ], "window": 0.1 } ] }, "ttft": { "unit": "requests_per_second", "series": [ { "key": "string", "values": [ 0.1 ], "window": 0.1 } ] }, "tokens": { "unit": "requests_per_second", "series": [ { "key": "string", "values": [ 0.1 ], "window": 0.1 } ] }, "concurrency": { "unit": "requests_per_second", "series": [ { "key": "string", "values": [ 0.1 ], "window": 0.1 } ] } }}Get per-day spend over a trailing window GET
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.
Get sandbox fleet metrics GET
View your organization's sandbox concurrency, creation counts, and allocated or consumed CPU hours over a selected time range. Returns sampled active-sandbox and configured-vCPU history, successful sandbox creation and execution counts, and allocated and consumed CPU hours. The selected range includes the current partial UTC hour and preceding full hours. The response names its exact bounds. Usage totals come from reported events and are not billing amounts. Paused sessions count as active sessions. Availability is enabled per organization; unavailable organizations receive 404.