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 |
| Cloud drives and shared filesystems | Storage |
| SSH keys | SSH keys |
| Container images, including private-registry credentials | Container images |
| From Claude Code / Codex / Claude Desktop | GPU MCP server |
Before you start
1. Compute access has to be enabled on your account. It is off by default. Ask us to enable it (support, or your account contact). Until it is, every compute endpoint answers:
HTTP 403
{ "error": "this account does not have Compute API access — ask us to enable it" }
2. Create a new key with Compute access. In the console go to API Keys → Create new key and tick Compute access. The checkbox only appears once your account is enabled. Keys you already have are not upgraded when the account is enabled — a key created without the checkbox works for models only, and answers:
HTTP 403
{ "error": "this API key has no compute scope — create a key with Compute access enabled" }
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.
3. 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. Prices are at GET /platform/gpu-prices (no auth): hourly_rate_usd per GPU-hour by gpu_type, and interruptible_hourly_rate_usd where the cheaper preemptible tier is sold (null otherwise).
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.
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 scope, the account has no Compute access, 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 |
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.