Skip to main content
Every charge is visible from the call that made it to the ledger row it wrote.

On each call

Every answer carries X-Charged-Usd, what the call cost, and X-Balance-Usd, the balance after it. Log them with the X-Request-Id to trace any charge later.

Your balance

GET /v1/wallet answers the balance, what is held for calls in progress, and what new calls can use:
A paid call needs its most possible cost in availableUsd, or it answers 402 with insufficient_balance. Top up in the console, or turn on auto-recharge.

Usage by day

GET /v1/usage answers calls, billed records, misses, errors and spend for each UTC day, by product and by route. Without dates it covers the last 30 days; ask for up to 90 at a time with from and to:

Every request

GET /v1/requests lists every request of the last 30 days, newest first, with its route, status, time and cost. Filter by statusClass (2xx, 4xx, 5xx), endpoint, from and to, or find one by its id with q. GET /v1/requests/{requestId} adds the request and response bodies, with keys and passwords removed. A key without full access sees only its own usage and requests. A key with full access sees the whole organization’s, or one key’s with apiKeyId.

The ledger

GET /v1/wallet/transactions lists every change to the balance, newest first: top-ups, charges, refunds and adjustments, each with the balance after it. A charge names the key, route and request it paid for. It needs a key with full access.

Caps per key

Give a key a daily spending cap in the console to bound what it can spend, such as a key an agent uses. A call that would pass the cap answers 402 with key_daily_cap_reached. GET /v1/limits and GET /v1/me show what the key spent today and what is left.