---
title: GPU API
description: GPU prices and availability, your pods, live status, network volumes and spending, stop/restart, and create/start/delete pods confirmed by the account owner
sidebar:
  order: 10
  badge:
    text: Alpha
    variant: tip
---

All endpoints live on `https://api.hostino.ai` and use an OAuth (Bearer) token or an API token. Only **your own** pods and volumes are visible. A pod or volume that isn't yours answers `404` (`pod_not_found` / `volume_not_found`). The MCP equivalents are in [GPU cloud with AI](/en/ai-mcp/gpu/).

| Endpoint | Scope | What it does |
|---|---|---|
| `GET /v1/gpu/catalog?region=` | `gpu:read` | GPUs: VRAM, `price_toman_per_hour`, `available_count` in the region (`any`, `eu`, `us`, `ca`), ready images |
| `GET /v1/gpu/pods` | `gpu:read` | Your pods with status, GPU, disks, hourly cost and connect addresses |
| `GET /v1/gpu/pods/:id` | `gpu:read` | Live status: uptime, GPU/CPU/RAM utilization, hourly cost running and stopped |
| `GET /v1/gpu/volumes` | `gpu:read` | Your network volumes |
| `GET /v1/gpu/usage?from=&to=` | `gpu:read` | Spending per day and pod (`YYYY-MM-DD`, default the last 30 days, at most one year) |
| `POST /v1/gpu/pods/:id/stop` | `gpu:write` | Stop a running pod (GPU billing ends; the disk is still billed) |
| `POST /v1/gpu/pods/:id/restart` | `gpu:write` | Restart a running pod |
| `POST /v1/gpu/pods` | `gpu:write` | **Quote** for a new pod: hourly cost + confirmation phrase (nothing is created) |
| `POST /v1/gpu/pods/:id/start` | `gpu:write` | **Quote** for starting a stopped pod (nothing starts) |
| `POST /v1/gpu/pods/:id/terminate` | `gpu:write` | Confirmation phrase for deleting a pod (nothing is deleted) |
| `POST /v1/gpu-requests/:rid/confirm` | `gpu:write` + `orders:confirm` | Run the create / start / delete with the phrase the account owner typed |

## Prices and availability

```bash
curl -s "https://api.hostino.ai/v1/gpu/catalog?region=eu" -H "Authorization: Bearer $TOKEN"
```

```json
{
  "region": "eu",
  "gpus": [
    { "gpu": "RTX A5000", "vram_gb": 24, "price_toman_per_hour": 74250, "price_usd_per_hour": 0.27, "available_count": 10 }
  ],
  "images": [{ "id": "pytorch-2.8", "name": "PyTorch 2.8 · CUDA 12.8 · Python 3.11" }]
}
```

Prices are per GPU per hour. Pods are billed from account credit while running, and a stopped pod still bills its disk.

## Creating a pod (two steps)

```bash
curl -s -X POST https://api.hostino.ai/v1/gpu/pods -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"name":"train-1","gpu":"RTX A5000","gpu_count":1,"image":"pytorch-2.8","container_disk_gb":20,"volume_gb":50,"region":"eu"}'
```

The response has `request_id`, `cost_toman_per_hour`, `credit_toman` and `phrase` (`fa` and `en`). Show it to the account owner. Only after **they** type the phrase do you send it:

```bash
curl -s -X POST https://api.hostino.ai/v1/gpu-requests/$RID/confirm -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"confirmation":"<exactly what the owner typed>"}'
```

- Inputs: `name` (1–40 characters), `gpu` (name from the catalog), `gpu_count` 1–8, `image` (`pytorch-2.8` default, `pytorch-2.4`, `pytorch-2.2`, `pytorch-2.1`), `container_disk_gb` 10–500 (default 20). Then either `volume_gb` 0–2000 (default 50) with `region`, or `network_volume_id` (one of your volumes; its region is used).
- The quote is refused with `insufficient_credit` (credit below one hour of cost) or `gpu_unavailable` (not enough free GPUs in that region).
- The phrase expires and allows 5 attempts (`confirmation_mismatch` shows `attempts_left`). Starting a stopped pod (`/start`) and deleting one (`/terminate`) work the same way.
- `orders:confirm` is only granted to OAuth apps, after the user approves it on the consent screen. **API tokens (`hst_pat_…`) never get it**, so scripts can read, stop and restart pods but not create, start or delete them.

## Errors

`pod_not_found`, `volume_not_found`, `unknown_gpu`, `gpu_unavailable`, `insufficient_credit` (`402`), `pod_not_running`, `pod_already_running`, `invalid_region`, `invalid_dates`, `confirmation_mismatch`, `request_expired`, `too_many_attempts`. The format is in [Errors](/en/api/errors/).
