Skip to content
Hayonix

API reference · Pods

Price estimate for a pod configuration: hourly running and stopped cost

GET/v1/pods/estimate
API keyworkload:readProject
TypeScript
client.pods.estimate()
Python
client.pods.estimate()
CLI
hayonix pods estimate

Prices a configuration from the price book in force without creating anything. Network volumes are itemised but kept out of the running and stopped totals, because they are billed whether or not a pod uses them.

Project API key (Authorization: Bearer sk_…), or a console session. Requires the workload: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/pods/estimate?sku=gpu-l4-24gb" \
  -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

    SKU code, as listed by the pod hardware route

    1–64 characters

  • gpu_countinteger | null

    Number of GPUs: at least 1 for a GPU SKU, 0 for a CPU SKU

    0–8 · default 0

  • pricing_classstring

    `interruptible` costs less and may be stopped (preempted) when on-demand work needs the capacity; it then waits in the queue to run again. On-demand pods are never preempted.

    One ofon_demandinterruptible

    default "on_demand"

  • container_disk_gbinteger

    Container disk size in GB

    5–500 · default 20

  • volume_gbinteger | null

    Size of the pod’s own volume in GB (0: none)

    0–2000 · default 0

  • network_volume_idsstring

    Comma-separated network volume IDs the pod would mount

    up to 500 characters

Response

200 PodEstimate — The estimate, from the price book in force

  • objectstringrequired

    Always `pod_estimate`: the type of this object

    One ofpod_estimate

  • currencystringrequired

    Always `usd`

    One ofUSD

  • price_book_versioninteger | nullrequired

    Version of the price book the estimate uses; null when none is in force

  • compute_per_secondstringrequired

    Integer nano-USD as a decimal string

    pattern ^-?[0-9]+$

  • running_per_hourstringrequired

    Compute plus the pod volume, while it runs

    pattern ^-?[0-9]+$

  • stopped_per_hourstringrequired

    While stopped: the pod volume only (compute is not billed)

    pattern ^-?[0-9]+$

  • network_volumes_per_hourstringrequired

    Network volumes it would mount; billed whether or not any pod uses them, so not in the totals above

    pattern ^-?[0-9]+$

  • linesarray of objectrequired

    The estimate item by item

    Show 4 fields of lines
    • kindstringrequired

      `compute`: the hardware. `container_disk`: included at no charge. `pod_volume`, `network_volume`: storage.

      One ofcomputecontainer_diskpod_volumenetwork_volume

    • descriptionstringrequired

      Free-text description

    • per_hourstringrequired

      Integer nano-USD as a decimal string

      pattern ^-?[0-9]+$

    • billedstringrequired

      `running`: only while the pod runs. `always`: until the volume is deleted.

      One ofrunningalways

Example response
Example response
{
  "object": "pod_estimate",
  "currency": "USD",
  "price_book_version": 1,
  "compute_per_second": "1500000000",
  "running_per_hour": "1500000000",
  "stopped_per_hour": "1500000000",
  "network_volumes_per_hour": "1500000000",
  "lines": [
    {
      "kind": "compute",
      "description": "string",
      "per_hour": "1500000000",
      "billed": "running"
    }
  ]
}

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.