API reference · Balance
Balance
Your available balance, the amount on hold for running jobs, and your auto-recharge settings.
GET https://api.framera.ai/v1/balance
Top up, change auto-recharge and see receipts in the console.
Headers
Authorizationstringrequired
Bearer fr_live_….Returns
objectstring
Always
balance.availablenumber
Dollars you can spend now.
heldnumber
Dollars on hold for jobs that are running. Charged if they succeed, returned if they fail.
currencystring
Always
usd.autoRechargeobject
Your auto-recharge settings.
enabledboolean
Whether auto-recharge is on.
thresholdnumber
When the available balance falls below this, we top up with your saved card.
amountnumber
How much each top-up adds.
How holds work
When you create a job, its price moves from available to held. If the job succeeds, the hold is charged; if it fails or is cancelled, it returns to available at once. A create that costs more than available answers 402 insufficient_balance. With auto-recharge on, we top up when the balance drops below the threshold; with it off, a balance.low event is sent when the balance falls below $10.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | The key is missing, wrong or revoked. |
| 429 | rate_limited | Too many requests. Retry after Retry-After seconds. |
| 500 or 503 | server_error | Something went wrong on our side, or a service is briefly unavailable. Any hold is released at once. |