Skip to content
Hayonix

API reference · Schema

CreateClusterRequest

  • namestringrequired

    Display name

    1–63 characters

  • member_countintegerrequired

    Number of identical members (2–16); member 0 is the head

    2–16

  • hardwareobjectrequired

    What each member runs on

    Show 2 fields of hardware
    • skustringrequired

      Hardware SKU of every member

    • gpu_countintegerrequired

      GPUs per member (0 for a CPU SKU)

      0–8

  • regionstringrequired

    Region every member is placed in

  • imagestring

    Container image (or give a template)

    up to 512 characters

  • template_idstring | null

    Template supplying the image and defaults

    ID with prefix tpl_

  • Environment variables of every member

    up to 128 items

    Show 2 fields of env
    • namestringrequired

      Variable name (the CLUSTER_RUNTIME_ prefix is reserved)

    • valuestringrequired

      Its value

  • Environment variables taken from project secrets

    up to 128 items

    Show 2 fields of secret_env
    • namestringrequired

      Variable name

    • secret_idstringrequired

      A secret of this project; its value is set when members start

      ID with prefix sec_

  • commandarray of string

    Replaces the image entrypoint

    up to 64 items

  • argsarray of string

    Replaces the image command

    up to 256 items

  • container_disk_gbinteger

    Writable container disk of each member (default 50)

    5–1000

  • registry_credential_idstring | null

    Credential for a private image

    ID with prefix rcr_

  • shared_volumeobject | null

    One volume mounted read-write at the same path on every member

    Show 2 fields of shared_volume
    • size_gbintegerrequired

      Size in GB (billed per GB-second while the cluster exists)

      1–4096

    • mount_pathstring

      Where every member mounts it (default /shared)

  • one_member_per_hostboolean

    Place every member on a host of its own (default false: members may share a host when it has room). When there are not enough such hosts the request fails with 409 `insufficient_capacity` and nothing is created.

Example
{
  "name": "llm-train",
  "member_count": 2,
  "hardware": {
    "sku": "cpu-4c-16gb",
    "gpu_count": 0
  },
  "region": "dev-local-1",
  "image": "registry.example.com/team/train:1",
  "env": [
    {
      "name": "GLOO_SOCKET_IFNAME",
      "value": "eth0"
    }
  ],
  "shared_volume": {
    "size_gb": 100,
    "mount_path": "/shared"
  }
}

Used by