API reference · Clusters
What a cluster of this shape costs per hour at today’s prices
/v1/clusters/estimate- TypeScript
client.clusters.estimate()- Python
client.clusters.estimate()- CLI
hayonix clusters estimate
Compute is billed per second from the start of each member’s run; the shared volume per GB-second while the cluster exists. Hourly figures are exact multiples of the per-second prices, except storage, which is rounded down for display.
Project API key (Authorization: Bearer sk_…), or a console session. Requires the cluster: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/clusters/estimate?sku=%3Csku%3E" \
-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
skustringrequiredHardware SKU
gpu_countinteger | nullGPUs per member
0–8 · default 0
member_countintegerNumber of members
2–16 · default 2
shared_volume_gbinteger | nullShared volume size in GB (0: none)
0–4096 · default 0
Response
200 ClusterEstimate — The estimate
objectstringrequiredAlways `cluster_estimate`: the type of this object
One of
cluster_estimatemember_per_hourstring | nullrequiredOne member’s compute per hour, nano-USD (null if the SKU is not priced)
pattern ^-?[0-9]+$
compute_per_hourstring | nullrequiredEvery member’s compute per hour, nano-USD
pattern ^-?[0-9]+$
shared_volume_per_hourstringrequiredThe shared volume per hour, nano-USD (rounded down)
pattern ^-?[0-9]+$
total_per_hourstring | nullrequiredCompute plus storage per hour, nano-USD
pattern ^-?[0-9]+$
price_book_versioninteger | nullrequiredPrice book the estimate comes from
Example response
{
"object": "cluster_estimate",
"member_per_hour": "1500000000",
"compute_per_hour": "1500000000",
"shared_volume_per_hour": "1500000000",
"total_per_hour": "1500000000",
"price_book_version": 1
}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. |