v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Billing

show charges

Shows charges per instance, including GPU, storage, and bandwidth. For invoice/payment records (Stripe top-ups, transfers, payouts), use show invoices instead.

CLI: vastai show invoices-v1 --charges

get/api/v0/charges/

Query parameters

select_filtersstring required

day (required). Date range in unix seconds (UTC). Operators: gte, lte.

type (optional). Filter by contract type: instance, volume, serverless. Operator: in.

Examples:

// All charges in January 2026
{"day":{"gte":1767225600,"lte":1769903999}}

// Only instance charges
{"day":{"gte":1767225600,"lte":1769903999},"type":{"in":["instance"]}}

// Volumes and serverless only
{"day":{"gte":1767225600,"lte":1769903999},"type":{"in":["volume","serverless"]}}
format'table' | 'tree'
Example:table
  • table (default) flat list of per-contract rows with type: "instance" or "volume".
  • tree serverless contracts are collapsed under endpoint/workergroup wrappers with type: "serverless" and source: "endpoint-<id>" / "workergroup-<id>". Regular instances and volumes are unchanged.
latest_firstboolean
Example:true

Sort by most recent charges first.

limitinteger
Example:20

Max results per page. Server maximum 500.

after_tokenstring
Example:eyJ2YWx1ZXMiOiB7ImlkIjogMTIzNDU2Nzh9fQ==

Pass the next_token value from the previous response to fetch the next page of results. When the response returns next_token: null, there are no more pages.

Response

Paginated per-instance charge results

successboolean
countinteger

Number of contracts returned in this page.

totalinteger

Total number of contracts matching the filters.

next_tokenstring nullable

Pagination cursor for the next page. null when no more pages.

Example response

{
  "success": true,
  "count": 2,
  "total": 14,
  "next_token": "eyJ2YWx1ZXMiOiB7ImlkIjogMTIzNDU2Nzh9fQ==",
  "results": [
    {
      "start": 1730419200,
      "end": 1730678400,
      "type": "instance",
      "source": "instance-12345678",
      "description": "Instance 12345678 Charges - 4 days",
      "amount": 38.421,
      "metadata": {
        "template_id": 101,
        "label": "my-training-job",
        "endpoint_id": 19392,
        "workergroup_id": 25355
      },
      "items": [
        {
          "start": 1730419200,
          "end": 1730678400,
          "type": "gpu",
          "description": "96.000 hours at $0.389/hour",
          "amount": 37.344,
          "metadata": {},
          "items": []
        }
      ]
    }
  ]
}