Skip to main content
Amounts are in USD, the currency the ledger charges in. Every amount carries a decimal amount and the exact integer amount_micro_usd, so you never have to trust a rounding.

What a call costs

The price in GET /v2/sources/{id} is what the buyer pays: the source’s price with the Apiosk fee already in it. There is no separate orchestration charge — the sum of usage.sources[].cost equals usage.cost for every run.

How money moves

  1. Approve. The plan’s maximum cost is checked against the key’s per-request limit, its monthly limit and the organisation’s balance.
  2. Reserve. Before a source is called, its cost is reserved on the balance.
  3. Run. The source is called.
  4. Settle. The actual cost is charged and the remainder released.
A call that fails is refunded. A call whose outcome is unknown stays held until it is reconciled, and is never charged twice. Because the reservation happens before the provider is called, a balance can never go negative.

Balance

Requires billing:read.
The balance is the organisation’s and is shared by all of its keys. The limits are this key’s alone.

Usage

Requires billing:read. Returns what this key spent this month and its most recent charges, newest first.
string
charged is settled money. reserved is held for a call in flight. refunded was given back and counts against nothing.
string
The run that produced the charge; read it back with GET /v2/runs/{id}.

Topping up

Balances are funded in the app, under Organisation → Billing. An organisation’s main balance is separate from any workspace budget: API keys spend the main balance only.