Skip to content
Hayonix

API reference · Schema

UpdateServerlessEndpointRequest

  • namestring

    Its name

    1–63 characters

  • imagestring

    Container image reference

    1–512 characters

  • registry_credential_idstring | null

    ID of the registry credential

    ID with prefix rcr_

  • commandarray of string

    Replaces the image's entrypoint (default: the image's own)

    up to 64 items

  • argsarray of string

    Replaces the image's default arguments (default: the image's own)

    up to 256 items

  • Environment variables of every worker. Names starting with `WORKER_RUNTIME_` are reserved for the platform.

    up to 128 items

  • skusarray of string

    Acceptable hardware in order of preference; workers take the first with capacity

    1–5 items

  • gpu_countinteger

    GPUs per worker on GPU SKUs

    0–8

  • concurrencyinteger

    Jobs (queue endpoints, 1–64) or requests (HTTP endpoints, 1–1000) one worker takes at once (default 1)

    1–1000

  • disk_bytesinteger

    Limit on each worker container's writable disk, in bytes (default 0: no limit beyond the host's)

    at least 0

  • Models from the model hub the worker reads (one revision per repository)

    up to 8 items

    Show 1 field of models
    • reference_idstringrequired

      A model reference of this project (POST /v1/model-references). Its files are cached on the host and mounted read-only at /model-cache/models--<owner>--<name> before the worker starts; HF_HUB_CACHE points there unless env sets it.

      ID with prefix mrf_

  • HTTP endpoints only (required for them): where the container serves

    Show 2 fields of http
    • portintegerrequired

      The port your container serves HTTP on

      1–65535

    • health_pathstring

      Path the platform probes (GET; any 2xx or 3xx is healthy) before a worker takes requests, and to take it out of rotation when it fails (default `/health`)

      pattern ^\/[A-Za-z0-9._~/?=&%-]{0,255}$

  • Network volumes of this project to mount into every worker (at most 4; default none). Volumes live on one host until shared storage exists, so every worker of the endpoint then runs on the host the volumes are pinned to, and waits for capacity there when it is full. Changing the list makes a new release.

    up to 4 items

    Show 3 fields of volumes
    • volume_idstringrequired

      ID of the volume

      ID with prefix vol_

    • mount_pathstringrequired

      Absolute path inside every worker (not a system path such as /etc or /usr)

      2–256 characters

    • read_onlyboolean

      Mount read-only (default false: workers may write)

  • min_workersinteger

    Default 0

    0–100

  • max_workersinteger

    Default 3

    0–100

  • idle_timeout_secondsinteger

    An idle worker is removed after this (default 30)

    1–3600

  • execution_timeout_secondsinteger

    Per job (default 600)

    1–86400

  • queue_ttl_secondsinteger

    A job not started within this expires (default 86400)

    10–604800

  • result_ttl_secondsinteger

    Results are kept this long after a job finishes (default 3600)

    60–604800

  • max_retriesinteger

    Re-runs after a lost worker before the job fails (default 2)

    0–10

  • Show 2 fields of scaling
    • policystringrequired

      Queue endpoints: `queue_delay` adds workers once the oldest queued job has waited `target` seconds; `requests_per_worker` keeps ceil((queued + running) / `target`) workers. HTTP endpoints: `in_flight` keeps ceil((requests in flight + waiting) / `target`) workers.

      One ofqueue_delayrequests_per_workerin_flight

    • targetinteger

      Seconds (queue_delay, default 5), jobs per worker (requests_per_worker, default 1) or requests in flight per worker (in_flight, default 1)

      1–3600

  • webhook_urlstring (uri) | null

    Default completion webhook for jobs of this endpoint

    up to 2048 characters

  • cold_start_wait_secondsinteger

    HTTP endpoints: a request that finds no ready worker waits this long for one to start or resume before it is answered 503 `no_worker_ready` (default 60)

    1–300

  • drain_timeout_secondsinteger

    HTTP endpoints: a worker leaving rotation (scale-down, new release) gets this long to finish the requests it has in flight (default 60)

    1–3600

  • Show 2 fields of fast_resume
    • max_paused_workersinteger

      Idle workers to keep paused instead of removing them, so the next request or job resumes one in a fraction of a cold start (default 0: off). Paused time is not charged.

      0–10

    • paused_keep_secondsinteger

      A worker paused this long is removed (default 600)

      30–86400

Example
{
  "max_workers": 5,
  "image": "registry.example.com/team/captioner:1.1.0"
}

Used by