API Runs
Billing for workflow runs triggered through the REST API, including spend caps.
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 run would exceed the cap, it will not start and you receive a spend cap error.
Authentication and spend caps#
Requests require a valid API key with run scope. If your key has a spend cap, Edgaze sums recent reserved and spent amounts before starting a run. If the quoted run would exceed the cap, no run starts.
Keys without a spend cap are limited only by wallet balance and bundle availability.
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: wallet charge or bundle consumption, plus creator earnings at 80% of margin. On failure, margin is not charged except for the killed-run partial compute case.
Response behavior#
Successful runs return a run ID you can track. If you do not have enough wallet balance or you hit your spend cap, the run does not start and the API returns an error message explaining why. Invalid or missing API keys return a separate auth error.
Special cases#
- Bundle via API: Works the same as the product UI when the bundle matches the workflow version.
- BYOK via API: Same orchestration and margin pricing as UI BYOK runs.
- Composed workflow: Root charge covers the summed child prices. Child creators earn independently on success.
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
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.