Skip to main content

GPU clusters (Compute API)

A cluster is 2–8 identical replicas of one configuration in one region, sharing a network filesystem — for multi-node training or a fleet of workers. What a cluster is and how it behaves is described in GPU clusters; this page is the API.

Prerequisites (a key with Compute access — Read-only to view, Full to launch — and credit) and the shared rules (auth, rate limits, errors) are on the overview.

Endpoints​

MethodPathWhat it does
GET/gpu-clustersYour clusters: everything live, plus ended ones from the last 7 days (add ?ended=all for every ended one)
POST/gpu-clustersLaunch
GET/gpu-clusters/{id}One cluster
POST/gpu-clusters/{id}/extendAdd hours
GET/gpu-clusters/{id}/replicasThe running replicas (pod name, status, node)
GET/gpu-clusters/{id}/shared-filesystemsFilesystems attached to it
DELETE/gpu-clusters/{id}Terminate; on a cluster that has already ended, remove it from your list

The per-replica web terminal, upload and browse are console-only.

Quick run​

KEY="eco_YOUR_KEY"; API="https://api.ecohash.com"

# Launch: 2 replicas × 1 GPU in atl, 4 hours, with a new shared filesystem
curl -s -X POST $API/gpu-clusters \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{
"name": "train-2x1",
"region_id": "atl",
"gpu_count": 1,
"replicas": 2,
"container_image": "public.ecr.aws/a2b7e2y7/ecolink/gpu-base:v0.1.0",
"estimated_duration_hours": 4,
"new_shared_filesystems": [{ "name": "train-data", "size_gb": 200, "mount_path": "/data" }]
}'
# → 202 with the cluster; note "id"

curl -s $API/gpu-clusters/<id> -H "Authorization: Bearer $KEY" # status
curl -s $API/gpu-clusters/<id>/replicas -H "Authorization: Bearer $KEY" # the pods

curl -s -X DELETE $API/gpu-clusters/<id> -H "Authorization: Bearer $KEY" # terminate

POST /gpu-clusters​

FieldTypeRequiredNotes
region_idstringyesFrom GET /gpu-instances/availability. The region's GPU type is used — there is no gpu_type field
gpu_countintyesGPUs per replica: 1, 2, 4 or 8
replicasintyes2–8
container_imagestringyesPlatform image or any public image
estimated_duration_hoursintyes1–72. Clusters always have a fixed duration; the whole run is held at launch (hourly_rate × gpu_count × replicas × hours)
namestringno
startup_commandstringnoRuns on every replica
service_portintnoExpose this port at https://api.ecohash.com/gpu-clusters/{id}/service/, load-balanced across replicas
interruptibleboolnoNot offered for clusters (one stopped node would end the job); omit it
template_idintnoThe template this launch came from. It records where the launch came from and does not fill in any other field: send the template's spec fields with it
shared_filesystemsarraynoAttach existing: [{ "id": 38, "mount_path": "/data" }]
new_shared_filesystemsarraynoCreate and attach: [{ "name", "size_gb", "mount_path" }]

Cloud drives cannot be attached to a cluster (one drive mounts to one pod); use a shared filesystem.

Returns 202 Accepted with the cluster (status pending). 402 if the hold cannot be taken; 409 if the region has too few free GPUs for gpu_count × replicas.

The cluster object​

FieldMeaning
id, name, region_id, gpu_type, gpu_count, replicas, container_image, startup_command, service_portWhat you launched; the replica count is fixed for the cluster's life
statuspending → running → stopped; degraded while some replicas are down; failed
hourly_rate_usdRate for the whole cluster as launched (per-GPU rate × gpu_count × replicas)
estimated_duration_hoursThe fixed duration
endpoint_urlPublic URL when service_port is set
created_at, started_at, terminated_atBilling runs from started_at

GET /gpu-clusters/{id}/replicas​

[
{ "name": "cluster-40-0", "status": "Running", "node": "atl-gpu-3" },
{ "name": "cluster-40-1", "status": "Running", "node": "atl-gpu-5" }
]

POST /gpu-clusters/{id}/extend​

{ "hours": 2 }

Holds hours × hourly_rate_usd now (the rate is already for the whole cluster) and moves the auto-stop time.

DELETE /gpu-clusters/{id}​

Terminates all replicas; the cluster's status becomes stopped and unused held credit is refunded once they have stopped. Attached shared filesystems are kept. While it shuts down, the cluster reads "terminating": true; afterwards it stays in your list for 7 days. Calling DELETE on a cluster that has already ended removes it from your list ({"status": "removed"}); its billing history is kept.

Your privacy choices

Essential cookies are always on. You can change these choices at any time.