API reference · Pods
Price estimate for a pod configuration: hourly running and stopped cost
/v1/pods/estimate- 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
| 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
skustringrequiredSKU code, as listed by the pod hardware route
1–64 characters
gpu_countinteger | nullNumber 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 of
on_demandinterruptibledefault "on_demand"
container_disk_gbintegerContainer disk size in GB
5–500 · default 20
volume_gbinteger | nullSize of the pod’s own volume in GB (0: none)
0–2000 · default 0
network_volume_idsstringComma-separated network volume IDs the pod would mount
up to 500 characters
Response
200 PodEstimate — The estimate, from the price book in force
objectstringrequiredAlways `pod_estimate`: the type of this object
One of
pod_estimatecurrencystringrequiredAlways `usd`
One of
USDprice_book_versioninteger | nullrequiredVersion of the price book the estimate uses; null when none is in force
compute_per_secondstringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
running_per_hourstringrequiredCompute plus the pod volume, while it runs
pattern ^-?[0-9]+$
stopped_per_hourstringrequiredWhile stopped: the pod volume only (compute is not billed)
pattern ^-?[0-9]+$
network_volumes_per_hourstringrequiredNetwork volumes it would mount; billed whether or not any pod uses them, so not in the totals above
pattern ^-?[0-9]+$
linesarray of objectrequiredThe estimate item by item
ShowHide 4 fields of
lineskindstringrequired`compute`: the hardware. `container_disk`: included at no charge. `pod_volume`, `network_volume`: storage.
One of
computecontainer_diskpod_volumenetwork_volumedescriptionstringrequiredFree-text description
per_hourstringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
billedstringrequired`running`: only while the pod runs. `always`: until the volume is deleted.
One of
runningalways
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:
| 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. |