Skip to content
Hayonix

API reference · Schema

PodConfig

  • imagestringrequired

    Container image reference

  • hardwareobjectrequired

    SKU and number of GPUs the pod runs on

    Show 2 fields of hardware
    • skustringrequired

      Hardware type code

    • gpu_countintegerrequired

      Number of GPUs

  • regionstringrequired

    Region code

  • pricing_classstringrequired

    `interruptible` costs less and may be stopped (preempted) when on-demand work needs the capacity; it then waits in the queue to run again. On-demand pods are never preempted.

    One ofon_demandinterruptible

  • container_disk_gbintegerrequired

    Writable container disk in GB; reset whenever the container is recreated (stop, reconfigure)

  • volumeobject | nullrequired

    The pod’s own volume and where it is mounted; null for none

    Show 2 fields of volume
    • volume_idstringrequired

      ID of the volume

    • mount_pathstringrequired

      Absolute path the volume is mounted at inside the container

  • network_volumesarray of objectrequired

    Network volumes the pod mounts

    Show 3 fields of network_volumes
    • volume_idstringrequired

      ID of the volume

    • mount_pathstringrequired

      Absolute path the volume is mounted at inside the container

    • read_onlybooleanrequired

      Mounted read-only

  • portsarray of objectrequired

    Exposed container ports

    Show 4 fields of ports
    • portintegerrequired

      Port number the container listens on

    • protocolstringrequired

      `http`: served at the port’s HTTPS URL (WebSocket included). `tcp`: raw TCP, reachable through SSH port forwarding.

      One ofhttptcp

    • visibilitystringrequired

      `public`: anyone with the URL. `private`: no URL; SSH port forwarding and the project network only.

      One ofpublicprivate

    • namestringrequired

      Its name

  • envarray of objectrequired

    Plain environment variables

    Show 2 fields of env
    • namestringrequired

      Its name

    • valuestringrequired

      Value of the variable

  • secret_envarray of objectrequired

    Environment variables taken from project secrets (values are never shown)

    Show 2 fields of secret_env
    • namestringrequired

      Its name

    • secret_idstringrequired

      ID of the secret

  • commandarray of stringrequired

    Replaces the image’s entrypoint when non-empty

  • argsarray of stringrequired

    Replaces the image’s default arguments when non-empty

  • registry_credential_idstring | nullrequired

    ID of the registry credential

  • sshbooleanrequired

    Allow SSH (and SFTP, port forwarding) with the project’s SSH keys

  • Models mounted read-only from the host’s model cache

    Show 1 field of models
    • reference_idstringrequired

      The model reference mounted

Example
{
  "image": "string",
  "hardware": {
    "sku": "string",
    "gpu_count": 1
  },
  "region": "string",
  "pricing_class": "on_demand",
  "container_disk_gb": 1,
  "volume": {
    "volume_id": "string",
    "mount_path": "string"
  },
  "network_volumes": [
    {
      "volume_id": "string",
      "mount_path": "string",
      "read_only": true
    }
  ],
  "ports": [
    {
      "port": 1,
      "protocol": "http",
      "visibility": "public",
      "name": "string"
    }
  ],
  "env": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "secret_env": [
    {
      "name": "string",
      "secret_id": "string"
    }
  ],
  "command": [
    "string"
  ],
  "args": [
    "string"
  ],
  "registry_credential_id": "string",
  "ssh": true,
  "models": [
    {
      "reference_id": "string"
    }
  ]
}