---
title: Billing & Spend Caps
description: API runs bill identically to product UI runs. Keys optionally enforce spend caps before a run starts.
source: https://www.edgaze.ai/docs/api/billing
section: api
---
# Billing & Spend Caps

> API runs bill identically to product UI runs. Keys optionally enforce spend caps before a run starts.

API runs bill identically to product UI runs. Keys optionally enforce spend caps before a run starts: useful for staging keys, partner integrations, and blast-radius control.

For wallet funding details, see [API Runs (billing guide)](/docs/billing/api-runs).

## Funding order

When a run triggers, the platform resolves funding in a fixed order. Your integration does not choose the path: but understanding it explains why some runs succeed without wallet balance.

1. Eligible locked bundle for the pinned workflow version.
2. Wallet balance for displayed run price plus margin.

## Spend caps

Caps reserve estimated microdollars atomically before wallet hold. Windows: daily, monthly, or lifetime. When exceeded, POST /runs returns **402 spend_cap_reached** synchronously: no run id is issued.

## Pricing visibility

Workflow list and detail responses include `displayedRunPriceUsd`: the buyer-facing price. GET /runs/{id} returns `displayedChargeUsd` on completion. Raw compute cost is never exposed via the API.
