API Runs
Billing for workflow runs triggered through the REST API, including spend caps.
Developers running workflows through the API.
Overview#
API-triggered runs use the same billing as runs started from the product UI. Funding is wallet-based, with bundle draw first if the API caller has an eligible bundle for that workflow version.
API keys can set an optional spend cap. When a request would exceed the cap, the endpoint returns spend_cap_reached and does not start a run.
Authentication and spend caps#
Requests require a valid API key with run scope. If the displayed run price would exceed the key's spend cap, no run starts.
The public endpoint has no separate account-level spend cap. Keys without an API-key cap are limited by wallet balance, bundle availability, input limits, and rate limits.
Funding and execution#
Funding order matches the UI: eligible locked bundle first, then wallet. Insufficient wallet after bundle exhaustion blocks the run.
The API enforces the same input envelope limits as the product UI. Oversized input is rejected before any charge.
On success, billing is identical to UI runs: the wallet is charged or one eligible bundle run is consumed. Ordinary failed and cancelled runs are not charged. If a run is separately labeled as stopped at the compute limit, already-consumed compute may be retained.
Response behavior#
POST /runs may return 202 Accepted before funding checks finish. An insufficient wallet can therefore appear later as a failed run rather than as an immediate payment error. An API-key spend-cap failure is returned immediately.
See Create Run for response, charge, and retry outcomes.
Special cases#
- Bundle via API: Works the same as the product UI when the bundle matches the workflow version.
- BYOK via API: The same displayed pricing terms apply as for UI BYOK runs.
- Composed workflow: The displayed price covers the complete run.
What you see in Edgaze#
- API Vault: key creation with optional spend cap and window
- API responses: clear messages when funds or spend cap block a run
- Wallet history: the same charge lines as UI runs for the same account
Related policies#
- API Reference: REST endpoints, authentication, playground, and webhooks
- Funding Runs
- Run a Workflow
- API Vault: BYOK provider keys (not REST API keys)
- When Runs Fail
Was this useful?
Your response helps us improve the documentation.
Related documentation
How workflow runs are priced, funded, settled, and refunded. Step-by-step guides for buyers, creators, and developers.
How to open a workflow, fund a run, and what happens when it completes.
How the per-run price is built, what the creator earns, and what Edgaze keeps.