Create pools

Adds a node pool to one of the caller org's clusters and answers 201 with the created pool.

POST /v1/compute/clusters/{clusterId}/pools

Addresshttps://api.hanzo.ai/v1/compute/clusters/{clusterId}/pools
MethodPOST
OperationcreateNodePool
AuthAuthorization: Bearer $HANZO_API_KEY

Adds a node pool to one of the caller org's clusters and answers 201 with the created pool. Only the CreateNodePoolSpec fields are forwarded; owner/provider/clusterId ride in the query exactly as Visor expects them.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
clusterIdpathstringyesClusterID is the cluster to add the pool to, from the URL path.
autoScalebodyboolean—AutoScale turns the provider's cluster autoscaler on for this pool.
clusterIdbodystring—ClusterID is the cluster to add the pool to, from the URL path.
countbodyinteger (int64)—Count is how many nodes the pool starts with.
maxNodesbodyinteger (int64)—MaxNodes is the ceiling the autoscaler may not grow the pool past, and so the bound on what this pool can spend.
minNodesbodyinteger (int64)—MinNodes is the floor the autoscaler may not shrink the pool below.
namebodystring—Name is the pool's name.
providerbodystring—Provider is the cloud the cluster lives on (e.g. "digitalocean").
sizebodystring—Size is the provider size slug for each node (e.g. "s-4vcpu-8gb").

Response

StatusBodyMeaning
200compute.nodePoolViewok
defaultproblem-detailsrefused

200 body — 7 fields.

FieldInTypeAlwaysDescription
autoScalebodyboolean—AutoScale reports whether the provider's cluster autoscaler owns this pool's size, moving Count between MinNodes and MaxNodes as workloads demand.
countbodyinteger (int64)—Count is how many nodes the pool has right now.
maxNodesbodyinteger (int64)—MaxNodes is the ceiling the autoscaler will not grow the pool past, and so the bound on what this pool can cost.
minNodesbodyinteger (int64)—MinNodes is the floor the autoscaler will not shrink the pool below.
namebodystring—Name is the pool's name as the provider knows it.
poolIdbodystring—PoolID is the provider's id for the pool — the value the scale and delete routes address it by.
sizebodystring—Size is the provider size slug every node in the pool runs at ("s-4vcpu-8gb", "gpu-h100x8-640gb").

Failure carries the platform error shape — see Errors.

Examples

hanzo compute clusters pools create <clusterId>
import { Configuration, ComputeApi } from 'hanzoai';

const api = new ComputeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.createNodePool({ clusterId: 'clusterId', autoScale: false, clusterId: "<clusterId>" });
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).create_node_pool(cluster_id='clusterId', auto_scale=False, cluster_id="<clusterId>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ComputeAPI.CreateNodePool(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::create_node_pool(&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).createNodePool();
curl -X POST https://api.hanzo.ai/v1/compute/clusters/<clusterId>/pools \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "autoScale": false,
       "clusterId": "<clusterId>"
     }'

Tool compute, op createNodePool — 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": "createNodePool",
           "input": {
             "clusterId": "<clusterId>",
             "autoScale": false
           }
         }
       }
     }'

Compute API · All Hanzo APIs · Interactive reference

Was this page useful?