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

Pod GPU metrics

Returns utilization, memory, power and temperature time series for each of a pod's GPUs over the selected range, sampled on the host that runs the pod. The telemetry is host-side (nvidia-smi on NVIDIA hosts, amd-smi on AMD), sampled on the node that runs the pod and returned as one continuous time grid. Every series and every GPU in a response shares that grid: the value at index i of any values array was measured at start plus i times stepSeconds, and a null means the node reported no sample at that point. The window ends now and covers only the periods this pod actually held the GPUs it is reported against, so a card that ran another customer's pod earlier never contributes a sample here. A GPU attached to a VM is passed through to the guest, so the host cannot read it. That case answers 200 with an accelerator status of unavailable and an empty gpus list rather than an error, and so do a pod that has not started yet, a pod that was not running in the selected range, and a metrics store that cannot be reached: the accelerator object is the answer, and the client renders its detail sentence. A host that stopped reporting while the pod is still running answers degraded with the history up to the last sample still attached. This operation is exposed as an agent tool by default, in the same class as a pod's burn rate: "how busy were my GPUs" is a read-only question about a resource the caller already owns.

Required permission

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

Command line

The orl CLI wraps this endpoint:

orl vms metrics get <id>
GET
/v1/vms/{id}/metrics

Authorization

apiKey
headerAuthorizationBearer <token>

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

Path Parameters

id*string

Query Parameters

range?string

Length of the window ending now. A longer range is returned at a coarser step, so the number of points stays bounded.

Default"1h"
Value in"1h""6h""24h""7d"

Response Body

The pod's GPU time series

application/json
  1. response
vmId*string
range*string

the requested window length; the window always ends at the moment the request was served

Value in"1h""6h""24h""7d"
start*string

first point of the returned grid, after the requested range was clipped to the periods this pod actually held GPUs on its current node. Equal to end when nothing was queried.

Formatdate-time
end*string

last point of the returned grid. It is the newest grid point at or before the moment the request was served, so it can be up to one step older than that moment.

Formatdate-time
stepSeconds*integer

seconds between grid points: 60 for a 1h range, 300 for 6h, 900 for 24h, 3600 for 7d

pointCount*integer

length of the values array of every series in this response. 0 when nothing was queried, in which case start equals end.

accelerator*

whether accelerator telemetry could be read at all, and why not when it could not. The status is the answer: an unreadable accelerator is still a 200.

gpus*array<>

one entry per GPU this pod holds or held during the returned window, in the order the pod claimed them. Empty whenever the response carries no series at all, which is every unavailable status and the source_unreachable one.

Example Request
curl -X GET 'https://api.openrelay.inc/v1/vms/string/metrics'
Example Response
{  "vmId": "4f6b9a1e-9f1c-4c58-a6a3-1f2f0f6f7a10",  "range": "1h",  "start": "2026-07-18T09:12:00Z",  "end": "2026-07-18T09:15:00Z",  "stepSeconds": 60,  "pointCount": 4,  "accelerator": {    "class": "accelerator",    "status": "available",    "source": "nvidia-smi"  },  "gpus": [    {      "bdf": "0000:04:00.0",      "busySeconds": 169.2,      "series": [        {          "key": "utilization_ratio",          "unit": "ratio",          "values": [            0.97,            0.94,            null,            0.91          ]        },        {          "key": "memory_used_bytes",          "unit": "bytes",          "values": [            42949672960,            43486543872,            null,            43486543872          ]        }      ]    }  ]}