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 URLhttps://api.hanzo.ai
Operations30
AuthAuthorization: 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

SurfaceReaches this capability asCoverage
RESTcompute at its own prefix30 operations
CLIhanzo compute …30 of 30
SDKComputeApi in every published client30 methods
MCPtool compute on https://api.hanzo.ai/v1/mcp28 operations, 26 under the document's own id — ask describe for the rest

Quickstart

export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/compute/gpus, operation listGpus:

hanzo compute gpus get
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

EndpointWhat it does
POST /v1/compute/clusters/{clusterId}/pools/{poolId}/scaleResizes 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}/poolsAdds 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/clustersReturns 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/clustersAttaches 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}/cancelCancels a queued or running render in the caller's org.
GET /v1/compute/fleet/jobsReturns 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/samplesReturns the caller org's utilization series, oldest first.
POST /v1/compute/fleet/samplesRecords a BYO worker's live GPU utilization into the SAME series the fleet board overlays.
GET /v1/compute/fleet/workersReturns the caller org's BYO machines — the ones that dialed in via hanzo link — with everything each host reported about itself.
GET /v1/compute/fleetReturns 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/alertsAn HONEST empty surface: Visor exposes no GPU alert inventory, so this returns [] rather than fabricating alerts.
GET /v1/compute/gpusReturns 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/clustersLists 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/clustersProvisions a DOKS cluster for the caller's org and answers 201.
GET /v1/compute/k8s/nodesReturns 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}/agentReturns 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}/agentBinds 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}/agentDetaches 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/agentsReturns 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/machinesReturns 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/machinesLaunch a metered machine for your org, or price one first with dryRun
GET /v1/compute/regionsLists the regions a machine can be launched in.
GET /v1/compute/sizesLists the machine sizes available to launch, with their specifications.

All Hanzo APIs · Interactive reference

Was this page useful?