Compute
The compute you rent from Hanzo: machines, GPUs and clusters — launch one, resize it, tear it down.
Also for this capability: API · CLI · MCP · SDKs
The compute you rent from Hanzo: machines, GPUs and clusters — launch one, resize it, tear it down.
| Base URL | https://api.hanzo.ai |
| Operations | 30 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Specification
Specification pending — no HIP in hanzoai/hips declares capability: compute yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.
Four surfaces
| Surface | Reaches this capability as | Coverage |
|---|---|---|
| REST | compute at its own prefix | 30 operations |
| CLI | hanzo compute … | 30 of 30 |
| SDK | ComputeApi in every published client | 30 methods |
| MCP | tool compute on https://api.hanzo.ai/v1/mcp | 28 operations, 26 under the document's own id — ask describe for the rest |
Quickstart
export HANZO_API_KEY=sk-... # console.hanzo.ai → API keysThen the first call — a read that needs nothing but the key. GET /v1/compute/gpus, operation listGpus:
CLI
SDK
HTTP
MCP
hanzo compute gpus get.ts
.py
.go
.rs
.java
import { Configuration, ComputeApi } from 'hanzoai';
const api = new ComputeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.listGpus();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ComputeApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ComputeApi(client).list_gpus()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.ComputeAPI.ListGpus(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, compute_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = compute_api::list_gpus(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ComputeApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new ComputeApi(client).listGpus();curl https://api.hanzo.ai/v1/compute/gpus \
-H "Authorization: Bearer $HANZO_API_KEY"Tool compute, op listGpus — 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": "compute",
"arguments": {
"op": "listGpus",
"input": {}
}
}
}'Answers 200 with object — ok.
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/compute/clusters/{clusterId}/pools/{poolId}/scale | Resizes a node pool to an absolute node count and returns the pool as Visor reports it after the change. |
DELETE /v1/compute/clusters/{clusterId}/pools/{poolId} | Removes a node pool from one of the caller org's clusters. |
POST /v1/compute/clusters/{clusterId}/pools | Adds a node pool to one of the caller org's clusters and answers 201 with the created pool. |
DELETE /v1/compute/clusters/{id} | Removes a BYO cluster from the caller org's fleet. |
GET /v1/compute/clusters | Returns the caller org's clusters from both sources: the managed clusters projected from Visor's node pools, and the BYO clusters attached to the caller's project. |
POST /v1/compute/clusters | Attaches a BYO cluster to the caller's org — the kubeconfig is validated, KMS-sealed and added to the fleet — and answers 201 with the cluster as it now appears on GET /v1/compute/clusters. |
POST /v1/compute/fleet/jobs/{id}/cancel | Cancels a queued or running render in the caller's org. |
GET /v1/compute/fleet/jobs | Returns the caller org's gpu-jobs render queue, each row tagged with the GPU it targets (empty = the shared any-GPU lane) and the node claiming it, optionally narrowed to one GPU's queue and/or one status. |
GET /v1/compute/fleet/samples | Returns the caller org's utilization series, oldest first. |
POST /v1/compute/fleet/samples | Records a BYO worker's live GPU utilization into the SAME series the fleet board overlays. |
GET /v1/compute/fleet/workers | Returns the caller org's BYO machines — the ones that dialed in via hanzo link — with everything each host reported about itself. |
GET /v1/compute/fleet | Returns every compute unit the caller's org has, from every source, each carrying its latest utilization: agent run-targets, the BYO machines that dialed in, attached BYO clusters and Visor-provisioned machines. |
GET /v1/compute/gpus/alerts | An HONEST empty surface: Visor exposes no GPU alert inventory, so this returns [] rather than fabricating alerts. |
GET /v1/compute/gpus | Returns one row per physical accelerator the caller's org has, derived from its real GPU machines (the size slug says how many cards a node holds) and from the accelerators BYO workers report through nvidia-smi. |
GET /v1/compute/k8s/clusters/{id} | Returns one cluster's detail: node pools + worker nodes. |
DELETE /v1/compute/k8s/clusters/{id} | Destroys a DOKS cluster by id and answers 204. |
GET /v1/compute/k8s/clusters | Lists the org's DOKS clusters (Visor, house account) folded with the org's BYO clusters — ONE fleet cluster view under the unified k8s noun. |
POST /v1/compute/k8s/clusters | Provisions a DOKS cluster for the caller's org and answers 201. |
GET /v1/compute/k8s/nodes | Returns every DOKS worker node in the org's clusters as a machine — the SAME set the fleet folds in (managedMachines), exposed directly under the k8s noun. |
POST /v1/compute/machines/{id}/{action} | Message a bot, or stop it, by naming the action in the path |
GET /v1/compute/machines/{id}/agent | Returns the agent binding of one of the caller org's machines, or 404 when the machine runs no bot runtime. |
PUT /v1/compute/machines/{id}/agent | Binds a cloud Agent to one of the caller org's machines: the machine is recorded as running that Agent's @hanzo/bot runtime. |
DELETE /v1/compute/machines/{id}/agent | Detaches the agent runtime from one of the caller org's machines. |
GET /v1/compute/machines/{id} | Returns one of the caller org's machines by its org-scoped name. |
DELETE /v1/compute/machines/{id} | Terminates one of the caller org's machines. |
GET /v1/compute/machines/agents | Returns every agent↔machine binding in the caller's org — which machines are running which cloud Agent, with vm's own reconciled status. |
GET /v1/compute/machines | Returns every machine the caller's org has — Visor's registry, the live DigitalOcean droplets and the DOKS worker nodes (deduped into one union), plus the BYO machines that dialed in via hanzo link (provider "byo"). |
POST /v1/compute/machines | Launch a metered machine for your org, or price one first with dryRun |
GET /v1/compute/regions | Lists the regions a machine can be launched in. |
GET /v1/compute/sizes | Lists the machine sizes available to launch, with their specifications. |
Was this page useful?