API reference · Serverless
List serverless endpoints in the project
/v1/serverless/endpoints- TypeScript
client.serverless.listEndpoints()- Python
client.serverless.list_endpoints()- CLI
hayonix serverless list
Each endpoint comes with its settings and current release. Deleted endpoints are not listed.
Project API key (Authorization: Bearer sk_…), or a console session. Requires the serverless_endpoint:read permission (a key's scope, or a role that includes it).
Examples
The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.
curl -sS "$API_BASE_URL/serverless/endpoints" \
-H "Authorization: Bearer $API_KEY"Request
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer and your API key. The key implies its project. |
X-Project-Id | session only | The project to act in, for console sessions. Requests with an API key leave it out. |
Query parameters
limitinteger1–200, default 50
1–200
cursorstring`next_cursor` of the previous page
up to 200 characters
Response
200 a page of results — A page of endpoints, newest first
The items of this page.
ShowHide 23 fields of
dataobjectstringrequiredAlways `serverless_endpoint`: the type of this object
One of
serverless_endpointidstringrequiredUnique ID (`sep_…`)
ID with prefix sep_
org_idstringrequiredOrganization it belongs to
ID with prefix org_
project_idstringrequiredProject it belongs to
ID with prefix prj_
namestringrequiredIts name
statusstringrequired`active`: takes jobs or requests. `deleted`: deleted (deleted endpoints are not returned by the API)
One of
activedeletedmodestringrequired`queue`: jobs through the job API, run by a handler on the worker runtime. `http`: requests to `url` are routed to the workers, which serve HTTP themselves. Fixed at creation.
One of
queuehttpurlstring | nullrequiredHTTP endpoints: where to send requests (any path), with an API key of this project holding `serverless_endpoint:invoke` as `Authorization: Bearer`. Null for queue endpoints.
min_workersintegerrequiredWorkers kept running even without work (billed while running)
max_workersintegerrequiredMost workers the autoscaler starts
idle_timeout_secondsintegerrequiredSeconds an idle worker above `min_workers` stays before removal
execution_timeout_secondsintegerrequiredSeconds one attempt of a job may run before it ends as `timed_out`; a job may ask for less
queue_ttl_secondsintegerrequiredSeconds a job may wait in the queue before it ends as `expired`
result_ttl_secondsintegerrequiredSeconds a finished job's result is kept
max_retriesintegerrequiredTimes a job is re-queued after its worker is lost before it fails
scalingobjectrequiredHow the number of workers follows demand
ShowHide 2 fields of
scalingpolicystringrequired`queue_delay`: add workers once the oldest queued job has waited `target` seconds. `requests_per_worker`: keep ceil((queued + running jobs) / `target`) workers. `in_flight` (HTTP endpoints): keep ceil((requests in flight + waiting) / `target`) workers.
One of
queue_delayrequests_per_workerin_flighttargetintegerrequiredSeconds (`queue_delay`), jobs per worker (`requests_per_worker`) or requests in flight per worker (`in_flight`)
webhook_urlstring | nullrequiredDefault completion webhook for jobs of this endpoint; null for none
cold_start_wait_secondsintegerrequiredHTTP endpoints: seconds a request that finds no ready worker waits for one before it is answered 503 `no_worker_ready`
drain_timeout_secondsintegerrequiredHTTP endpoints: seconds a worker leaving rotation gets to finish the requests it has in flight
fast_resumeobjectrequiredIdle workers kept paused (frozen, holding their memory and GPU) instead of removed. Paused time is not charged; paused workers are the first thing the platform reclaims when a host needs the capacity.
ShowHide 2 fields of
fast_resumemax_paused_workersintegerrequiredIdle workers kept paused instead of removed (0: fast resume is off)
paused_keep_secondsintegerrequiredSeconds a worker stays paused before it is removed
ShowHide 21 fields of
current_releaseobjectstringrequiredAlways `serverless_release`: the type of this object
One of
serverless_releaseidstringrequiredUnique ID (`srl_…`)
ID with prefix srl_
endpoint_idstringrequiredID of the endpoint
ID with prefix sep_
versionintegerrequiredRelease number within the endpoint: 1, 2, 3… (never reused)
statusstringrequired`rolling_out`: the current release while workers of older releases remain. `active`: the current release, every worker runs it. `superseded`: a newer release replaced it.
One of
rolling_outactivesupersededsourcestringrequiredWhat made the release: `created` (the endpoint was created), `updated` (an update changed the worker spec) or `rollback` (a copy of `based_on_release_id`)
One of
createdupdatedrollbackbased_on_release_idstring | nullrequiredID of the based on release
imagestringrequiredContainer image reference
registry_credential_idstring | nullrequiredID of the registry credential
commandarray of stringrequiredEntrypoint override; empty: the image's own
argsarray of stringrequiredArguments override; empty: the image's own
Environment variables; secrets appear only as references
skusarray of stringrequiredAcceptable hardware in order of preference
gpu_countintegerrequiredNumber of GPUs
concurrencyintegerrequiredJobs or HTTP requests one worker takes at once
disk_bytesintegerrequiredLimit on each worker's writable disk, in bytes (0: no limit beyond the host's)
Models the worker mounts from the host’s model cache
ShowHide 1 field of
modelsreference_idstringrequiredA 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_
httpobject | nullrequiredHTTP endpoints: where the container serves (null for queue)
ShowHide 2 fields of
httpportintegerrequiredThe port the container serves HTTP on
health_pathstringrequiredPath probed (GET; 2xx or 3xx is healthy) before a worker takes requests
Network volumes mounted into every worker; workers run on the host they are pinned to
ShowHide 3 fields of
volumesvolume_idstringrequiredID of the volume
ID with prefix vol_
mount_pathstringrequiredWhere every worker sees the volume
read_onlybooleanrequiredWorkers cannot write to it
created_atstring (date-time)requiredWhen it was created (ISO 8601, UTC)
completed_atstring (date-time) | nullrequiredWhen no worker of an older release remained
created_atstring (date-time)requiredWhen it was created (ISO 8601, UTC)
updated_atstring (date-time)requiredWhen it last changed (ISO 8601, UTC)
next_cursorstring | nullrequiredPass as `cursor` for the next page; null on the last page.
Example response
{
"data": [
{
"object": "serverless_endpoint",
"id": "sep_01jc5zq4m8k3v6x9t2w7r0b1e4",
"org_id": "org_01jc5zq4m8k3v6x9t2w7r0b1e4",
"project_id": "prj_01jc5zq4m8k3v6x9t2w7r0b1e4",
"name": "string",
"status": "active",
"mode": "queue",
"url": "string",
"min_workers": 1,
"max_workers": 1,
"idle_timeout_seconds": 1,
"execution_timeout_seconds": 1,
"queue_ttl_seconds": 1,
"result_ttl_seconds": 1,
"max_retries": 1,
"scaling": {
"policy": "queue_delay",
"target": 1
},
"webhook_url": "string",
"cold_start_wait_seconds": 1,
"drain_timeout_seconds": 1,
"fast_resume": {
"max_paused_workers": 1,
"paused_keep_seconds": 1
},
"current_release": {
"object": "serverless_release",
"id": "srl_01jc5zq4m8k3v6x9t2w7r0b1e4",
"endpoint_id": "sep_01jc5zq4m8k3v6x9t2w7r0b1e4",
"version": 1,
"status": "rolling_out",
"source": "created",
"based_on_release_id": "string",
"image": "string",
"registry_credential_id": "string",
"command": [
"string"
],
"args": [
"string"
],
"env": [
{
"name": null,
"value": null
}
],
"skus": [
"string"
],
"gpu_count": 1,
"concurrency": 1,
"disk_bytes": 1,
"models": [
{
"reference_id": "mrf_01jc5zq4m8k3v6x9t2w7r0b1e4"
}
],
"http": {
"port": 1,
"health_path": "string"
},
"volumes": [
{
"volume_id": "vol_01jc5zq4m8k3v6x9t2w7r0b1e4",
"mount_path": "string",
"read_only": true
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"completed_at": "2026-01-01T00:00:00.000Z"
},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"next_cursor": "string"
}Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
400 | invalid_request_error | A parameter or body field is missing or not allowed; param names it. |
401 | authentication_error | The key or session is missing, revoked or expired. |
403 | permission_error | The credential lacks the permission this needs, or the organization is suspended. |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |