Compute API overview
Everything you can do with GPU compute in the console is available over the API with an API key that has Compute access — the same endpoints the console uses, so the same prices, credit holds, refunds and account limits apply.
| Resource | Reference page |
|---|---|
| GPU instances — launch, SSH, extend, terminate | GPU instances |
| GPU clusters — multi-node, scale, extend | GPU clusters |
| Model instances — launch, follow, logs, stop | Model instances |
| Templates — list, quote, launch from one | Templates |
| Reserved GPU nodes — terms, nodes, workloads, payments (read-only) | Reserved GPU nodes |
| Cloud drives and shared filesystems | Storage |
| SSH keys | SSH keys |
| Container images, including private-registry credentials | Container images |
| From Claude Code / Codex / the Claude app | GPU MCP server |
Before you start
1. Create a key with Compute access. In the console go to API Keys → Create new key and choose Compute access:
- Read-only — list instances, clusters, model instances (and their logs), storage, SSH keys, container images and templates, check availability and your balance, and quote what a launch would cost. Nothing that launches, changes or deletes.
- Full — everything on these pages, including launching, extending, scaling and terminating.
A key created with Compute access Off works for models only. Access is fixed when the key is created — create a new key to change it. The compute endpoints refuse with a sentence that says what to do:
HTTP 403
{ "error": "this API key has no compute scope — create a key with Compute access (read-only or full)" }
HTTP 403
{ "error": "this API key is read-only for compute — use a key with full Compute access to launch, change or delete resources" }
Keys are per user. Each engineer on a team account creates their own, and what they launch is attributed to them; removing a member from the account revokes their keys. Account roles apply as in the console — for example, deleting a shared filesystem needs an owner's or admin's key.
2. Have credit. Anything that runs holds credit up front and is refused with 402 if the balance cannot cover it. GET /billing/balance tells you where you stand.
Base URL and auth
https://api.ecohash.com
Authorization: Bearer eco_YOUR_KEY
Responses are JSON. Errors are { "error": "<what to do>" } with the HTTP status.
Regions and GPU types
Every launch names a region_id and (for instances) a gpu_type. Take both from GET /gpu-instances/availability, exactly as returned — they are not guessable.
[
{
"id": "atl",
"name": "Atlanta",
"gpu_type": "NVIDIA-RTX-PRO-6000-Blackwell-Server-Edition",
"gpu_per_node": 8,
"total_nodes": 7,
"available": 44,
"vcpu_per_gpu": 16,
"ram_gb_per_gpu": 64,
"scratch_disk_gib": 400
}
]
available is live: the GPUs an on-demand launch can take now. Prices are at GET /platform/gpu-prices (no auth): hourly_rate_usd per GPU-hour by gpu_type. Where spot is offered to your account, its price and capacity are on the availability rows instead (spot_hourly_rate_usd, spot_available, spot_max_gpus_per_instance); see Spot instances.
Storage capacity per region is at GET /storage/availability.
Billing
Identical to the console — see Duration and extending and Storage for the full behaviour.
- Instances with no end time (
estimated_duration_hours: 0): the first hour is held at launch; every hour the usage is settled and the next hour is held; when the balance cannot cover a full hour the remainder is held and the instance stops at $0. - Instances and clusters with a fixed duration (
1–72h): the whole run is held at launch; auto-stop when it elapses; unused time refunded on early terminate. - Storage: no hold; billed daily per GB.
- Compute billing starts when the pod is actually running and stops at your terminate request.
- Accounts with reserved GPU nodes: GPU workloads run on the reserved nodes with no hourly charge and no hold (
"billing": "reserved"in responses); the reservation is billed by period instead.
GET /billing/balance → { "balance": 22.22, "account_id": 299, "bills_monthly": false }. Account owners can also read GET /billing/transactions.
Rate limits
- 60 requests per minute per key across the compute endpoints.
- 10 launches per minute per account (instances and clusters together).
Above either you get 429 with Retry-After. Poll status every few seconds, not in a tight loop.
Errors
| Status | Meaning |
|---|---|
401 | No key, or the key is invalid, revoked or expired |
402 | Not enough credit for the hold |
403 | The key has no Compute access, or is read-only and the call would change something; GPU access is turned off for your account; your role doesn't allow the action; or you are no longer a member — the error text says which |
404 | No such resource on this account |
409 | Wrong state (terminating something not running, deleting a drive that is attached, a duplicate name) or no free capacity |
429 | Rate limit |
Accounts with reserved GPU nodes can also get the reservation codes listed on Reserved GPU nodes.
What is not available over the API
The browser terminal, file upload and the file browser are console-only. Over the API you connect to an instance with SSH, and move files with scp/rsync or a cloud drive.
Contract
The fields documented on these pages are the ones we commit to. Anything else that appears in a response is not part of the contract and may change. Fields are only ever added, never renamed or removed.