Records a BYO worker's live GPU utilization into the SAME series the fleet…
Records a BYO worker's live GPU utilization into the SAME series the fleet board overlays.
POST /v1/visor/fleet/samples
| Address | https://api.hanzo.ai/v1/visor/fleet/samples |
| Method | POST |
| Operation | recordFleetSample |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Records a BYO worker's live GPU utilization into the SAME series the fleet board overlays. The org is the validated principal and source/kind are fixed server-side, so a worker names only its own metrics — never another tenant or another source. Answers 202: the warehouse write is DETACHED (its own bounded context, never in the response path), so a slow or absent warehouse cannot stall a heartbeat.
Request
7 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
gpuModel | body | string | — | GPUModel names the representative accelerator ("GB10"); GPUs carries how many. |
gpuUtil | body | number | — | GPUUtil is accelerator utilization as a fraction 0..1; the warehouse clamps anything outside that. |
gpus | body | integer | — | GPUs is how many accelerators this reading covers. |
host | body | string | — | Host is the node's hostname, for display. |
memFree | body | integer | — | MemFree is host memory still available, in BYTES. |
memUsed | body | integer | — | MemUsed is host memory in use, in BYTES. |
unit | body | string | — | Unit is the reporting node's own id — the same id it registered under, and the key the board joins this series onto. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | sampleAccepted | ok |
200 body — 1 field.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
recorded | body | boolean | — | Recorded is always true: the response is an acknowledgement, and the warehouse write is detached, so it reports acceptance, not durability. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, VisorApi } from 'hanzoai';
const api = new VisorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.recordFleetSample({ gpuModel: "<gpuModel>", gpuUtil: 0 });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import VisorApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = VisorApi(client).record_fleet_sample(gpu_model="<gpuModel>", gpu_util=0)cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.VisorAPI.RecordFleetSample(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, visor_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = visor_api::record_fleet_sample(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.VisorApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new VisorApi(client).recordFleetSample();curl -X POST https://api.hanzo.ai/v1/visor/fleet/samples \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"gpuModel": "<gpuModel>",
"gpuUtil": 0
}'Tool visor, op recordFleetSample — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "visor",
"arguments": {
"op": "recordFleetSample",
"input": {
"gpuModel": "<gpuModel>",
"gpuUtil": 0
}
}
}
}'How is this guide?