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 (Compute access, a key with the compute scope, credit) and the shared rules (auth, rate limits, errors) are on the overview.

Endpoints​

MethodPathWhat it does
GET/gpu-clustersYour clusters
POST/gpu-clustersLaunch
GET/gpu-clusters/{id}One cluster
POST/gpu-clusters/{id}/scaleChange the replica count
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

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 POST $API/gpu-clusters/<id>/scale -H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" -d '{ "replicas": 4 }'

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
interruptibleboolnoOnly where the region's GPU type lists an interruptible rate
template_idintnoLaunch from a template
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; replicas is the current count after any scale
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}/scale​

{ "replicas": 4 }

1–8. Changes the number of running replicas (scaling up needs the GPUs to be free). Billing stays at the rate and hold fixed at launch — scaling does not re-price the cluster. Returns { "id": 40, "replicas": 4 }.

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.

Your privacy choices

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