Credits & usage
GET /v1/credits
Your current wallet state.
curl https://api.infra.models/v1/credits \ -H "Authorization: Bearer im_live_..."
Response:
{
"object": "credit_balance",
"balance_credits": "25000000",
"locked_credits": "0",
"available_credits": "25000000",
"balance_usd": 25
}GET /v1/usage
Aggregate usage for the current calendar month (UTC).
{
"object": "usage",
"period": { "start": "2026-05-01T00:00:00Z", "end": "2026-05-18T..." },
"requests": 412,
"input_tokens": 124000,
"output_tokens": 38000,
"total_tokens": 162000,
"credits_charged": "2480000"
}How credits are charged
- On request: we estimate the cost from input tokens + your
max_tokensand reserveestimate × 1.1from your wallet's available balance. - During the call: locked credits keep you from accidentally over-spending if you fire many concurrent requests.
- After the call: we read the provider's actual token usage, charge that amount, and release the reservation.
- Every charge writes a row to
credit_ledger. The ledger is append-only and we publish reconciliation alerts if the wallet ever drifts fromSUM(ledger).
Credit unit
1,000,000 credits = $1 USD. We use integer credits everywhere — no floating-point money math.