Skip to content
Hayonix

API reference · Clusters

What a cluster of this shape costs per hour at today’s prices

GET/v1/clusters/estimate
API keycluster:readProject
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

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.
X-Project-Idsession onlyThe project to act in, for console sessions. Requests with an API key leave it out.

Query parameters

  • skustringrequired

    Hardware SKU

  • gpu_countinteger | null

    GPUs per member

    0–8 · default 0

  • member_countinteger

    Number of members

    2–16 · default 2

  • shared_volume_gbinteger | null

    Shared volume size in GB (0: none)

    0–4096 · default 0

Response

200 ClusterEstimate — The estimate

  • objectstringrequired

    Always `cluster_estimate`: the type of this object

    One ofcluster_estimate

  • member_per_hourstring | nullrequired

    One member’s compute per hour, nano-USD (null if the SKU is not priced)

    pattern ^-?[0-9]+$

  • compute_per_hourstring | nullrequired

    Every member’s compute per hour, nano-USD

    pattern ^-?[0-9]+$

  • shared_volume_per_hourstringrequired

    The shared volume per hour, nano-USD (rounded down)

    pattern ^-?[0-9]+$

  • total_per_hourstring | nullrequired

    Compute plus storage per hour, nano-USD

    pattern ^-?[0-9]+$

  • price_book_versioninteger | nullrequired

    Price book the estimate comes from

Example response
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:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.