Runs on the hosted service are paid from prepaid credits. Every run has a budget. Ephemeral reserves the whole budget before the run starts, charges what the run used and releases the rest.
Units
All amounts are whole numbers in US dollars, in one of two units.
| Unit | Used for | One dollar |
|---|---|---|
*_ | Run budgets, run costs, wallet balances and ledger entries | 1000000 |
*_ | Stripe purchases, automatic top-ups and payment history | 100 |
So cost_micros: 10000 is one cent, and amount_cents: 2500 is $25. A money field that is missing from a run object is zero.
What a run costs
A run's cost has up to three parts.
- Compute. The time from when the run leaves the queue until it ends, rounded up to whole seconds, at the compute rate. It never exceeds the charge for the full timeout.
GET /v1/mereturns the rate ascompute_micros_per_second. - Model calls. Before each model call, Ephemeral looks up the model's current price and authorizes a conservative upper bound for the call. When the provider reports what the call actually cost, that amount replaces the authorization. If a response is lost, interrupted or arrives without a trustworthy cost, the upper bound stays charged.
- Web requests. When the run has web access, each request costs $0.001 and each search $0.01, charged when it is sent. Refused requests are not charged.
Hosted runs support text and models whose price can be bounded in advance. GET /v1/models lists the models that qualify, with their prices.
Budgets
Set the budget with max_cost_micros on the run request. It can be 1 to 100,000,000 ($100). If you leave it out, the default budget applies; GET /v1/me returns it as default_max_cost_micros.
The budget must cover the compute charge for the full timeout: at least timeout_seconds multiplied by compute_micros_per_second. A smaller budget is rejected with 400; shorten the timeout or raise the budget.
At 200 micro-dollars per second ($0.72 an hour), the default 300-second timeout needs at least 60,000 and the 3,600-second maximum needs 720,000. The default budget of 500,000 covers timeouts up to 2,500 seconds.
During the run, any model call whose upper bound would take the run past its budget is refused, and so is any web request that would. This keeps the run within its budget. The refused call returns an error to the agent, and the run normally ends as failed.
Reserve, charge, release
- When you create a run, its status is
reservingwhile the whole budget is reserved from your available credits. If too little is available, the request fails with402and the run is recorded asfailed. - While the run is active,
cost_microsincludes the compute charge for the full timeout plus each model call, at its reported cost once the provider sends it or its upper bound until then, plus each web request. - After the run ends, the compute charge is recalculated from the time actually used.
- Ephemeral charges the final cost to your balance and releases the rest of the reservation. Then
billing_pendingbecomesfalse.
cost_micros as final only when the run's status is final and billing_pending is false. Before that, it can be higher than the amount you are charged.Credits and payments
Owners and admins buy credits in the customer portal under Billing, through Stripe Checkout. Each purchase is $5 to $10,000. Credits are added when Stripe confirms the payment, usually within seconds. Returning from the Checkout page does not add credits by itself.
| Wallet field | Meaning |
|---|---|
balance_ | Credits you hold. |
reserved_ | Credits reserved for runs that have not settled yet. |
available_ | Balance minus reservations. New runs reserve from this. |
The wallet also shows the latest 100 ledger entries, linked to the run or payment behind each one. The ledger is an account history and is not an invoice; Stripe provides a receipt for each payment.
Automatic top-up charges a saved card when a run's charge leaves your balance below a threshold you choose. It needs a saved card and your explicit consent. The top-up amount is $5 to $10,000, and the threshold is at least $1 and no more than the top-up amount. Saving a card does not turn it on. Removing the selected card without choosing another default turns it off.
Refunds and disputes are deducted from the balance and turn automatic top-up off. If a refund leaves the balance negative, new runs are blocked until you add credits.
Credits never expire. Within 14 days of a purchase, you can ask through support for the credits from that purchase that you have not used to be refunded to your card. Credits already used or reserved by a running run are not refunded. See the Terms of Service.