Docs / API reference

Billing & usage

Read your balance and usage, download invoices and manage spend limits. These endpoints require a key whose owner has the OWNER, ADMIN or BILLING role. See Billing model for how charges accrue.

Endpoints

MethodPathDescription
GET/billing/balanceCurrent prepaid balance
GET/billing/usageUsage line items
GET/billing/invoicesList invoices and receipts
GET/billing/invoices/{invoiceId}Retrieve an invoice
GET/billing/spend-limitRead the monthly spend limit
PUT/billing/spend-limitSet the monthly spend limit

Get balance

GET/billing/balance

Returns the organization's prepaid balance, updated every minute as resources run.

Request

curl https://api.apipods.com/v1/billing/balance \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "object": "balance",
  "balance": 412.37,
  "currency": "USD",
  "autoTopUp": {
    "enabled": true,
    "threshold": 100,
    "amount": 500
  },
  "updatedAt": "2026-11-18T15:41:00Z"
}

Get usage

GET/billing/usage

Returns usage line items for a date range (UTC, inclusive, at most 93 days). Amounts are in USD before tax.

Parameters

NameInTypeDescription
startDaterequiredquerystringYYYY-MM-DD.
endDaterequiredquerystringYYYY-MM-DD.
groupByqueryenumday (default), resource or gpuType.
resourceTypequeryenumpod, endpoint or network_volume.

Request

curl https://api.apipods.com/v1/billing/usage?startDate=2026-11-01&endDate=2026-11-18&groupBy=resource \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "object": "usage",
  "startDate": "2026-11-01",
  "endDate": "2026-11-18",
  "groupBy": "resource",
  "currency": "USD",
  "total": 120.76,
  "data": [
    {
      "resourceId": "pod_8f2k1x9q",
      "resourceType": "pod",
      "gpuTypeId": "NVIDIA_H100_80GB_SXM",
      "description": "GPU time",
      "quantity": 30010,
      "unit": "gpu_seconds",
      "amount": 73.19
    },
    {
      "resourceId": "ep_4n8wq2zt",
      "resourceType": "endpoint",
      "gpuTypeId": null,
      "description": "Serverless worker time",
      "quantity": 31840,
      "unit": "gpu_seconds",
      "amount": 41.27
    },
    {
      "resourceId": "vol_c7d2h4ke",
      "resourceType": "network_volume",
      "gpuTypeId": null,
      "description": "Network volume, standard",
      "quantity": 45,
      "unit": "gb_months",
      "amount": 6.3
    }
  ]
}

List invoices

GET/billing/invoices

Returns invoices for top-ups (type TOP_UP) and monthly usage statements (type STATEMENT), newest first.

Parameters

NameInTypeDescription
statusqueryenumPAID, OPEN or VOID.
limitqueryinteger1 to 100, default 20.
cursorquerystringPagination cursor.

Request

curl https://api.apipods.com/v1/billing/invoices \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "object": "list",
  "data": [
    {
      "id": "inv_7k2m9x4q",
      "object": "invoice",
      "number": "AP-2026-004812",
      "status": "PAID",
      "type": "TOP_UP",
      "subtotal": 500,
      "tax": 0,
      "total": 500,
      "currency": "USD",
      "taxNote": "Reverse charge: VAT to be accounted for by the recipient (Art. 196 Directive 2006/112/EC)",
      "periodStart": "2026-11-01T00:00:00Z",
      "periodEnd": "2026-11-01T00:00:00Z",
      "pdfUrl": "https://console.apipods.com/invoices/inv_7k2m9x4q.pdf",
      "createdAt": "2026-11-01T09:42:17Z"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Retrieve an invoice

GET/billing/invoices/{invoiceId}

Returns one invoice. pdfUrl is a link to the PDF that requires a console session or the API key as bearer token.

Parameters

NameInTypeDescription
invoiceIdrequiredpathstringThe invoice ID.

Request

curl https://api.apipods.com/v1/billing/invoices/inv_7k2m9x4q \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "id": "inv_7k2m9x4q",
  "object": "invoice",
  "number": "AP-2026-004812",
  "status": "PAID",
  "type": "TOP_UP",
  "subtotal": 500,
  "tax": 0,
  "total": 500,
  "currency": "USD",
  "taxNote": "Reverse charge: VAT to be accounted for by the recipient (Art. 196 Directive 2006/112/EC)",
  "periodStart": "2026-11-01T00:00:00Z",
  "periodEnd": "2026-11-01T00:00:00Z",
  "pdfUrl": "https://console.apipods.com/invoices/inv_7k2m9x4q.pdf",
  "createdAt": "2026-11-01T09:42:17Z"
}

Get spend limit

GET/billing/spend-limit

Returns the monthly spend limit, the low-balance alert threshold and spend so far this calendar month (UTC).

Request

curl https://api.apipods.com/v1/billing/spend-limit \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "object": "spend_limit",
  "monthlyLimit": 2000,
  "lowBalanceThreshold": 50,
  "currentMonthSpend": 873.41,
  "currency": "USD"
}

Set spend limit

PUT/billing/spend-limit

Sets the monthly limit. When currentMonthSpend reaches it, new pods and workers are blocked (402 spend_limit_reached), running pods are stopped and endpoints scale to zero. Storage is kept. A billing.spend_limit_reached event is sent.

Parameters

NameInTypeDescription
monthlyLimitrequiredbodynumber | nullUSD per calendar month, or null for no limit.
lowBalanceThresholdbodynumberSend billing.balance_low and an email below this balance.

Request

curl -X PUT https://api.apipods.com/v1/billing/spend-limit \
  -H "Authorization: Bearer $APIPODS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "monthlyLimit": 2500,
    "lowBalanceThreshold": 100
  }'

Response

200 OK
{
  "object": "spend_limit",
  "monthlyLimit": 2500,
  "lowBalanceThreshold": 100,
  "currentMonthSpend": 873.41,
  "currency": "USD"
}
StatusWhen
403insufficient_role: only OWNER, ADMIN and BILLING can change limits.