Create a key
POST /v1/api-keys mints a key. The secret is returned exactly once.
name are optional:
A request that would take the key past its limit is rejected with 402 and the message
this API key has reached its spend limit — nothing is charged. The wallet balance still
applies independently.
Update, disable, delete
POST /v1/api-keys/{id} patches a key. Send only what you want to change:
- The limit pair travels together: changing
limitIntervalrequireslimitUsdin the same request, and"limitUsd": nullclears both. - A disabled key fails every request with 401 (
this API key is disabled) until you re-enable it with{ "disabled": false }. - An expired key fails with 401 (
this API key has expired); expiry cannot be changed after creation — mint a new key instead. DELETE /v1/api-keys/{id}revokes a key permanently. This cannot be undone.
Per-key usage
GET /v1/api-keys/{id}/usage?days=7|30|90 returns one key’s spend: totals, a per-API
breakdown, a daily series, and calendar totals for today, this week, and this month —
all in USD.
GET /v1/api-keys) also carries each key’s 30-day usage30d
({ requests, costUsd }) plus its current-window spentUsd against limitUsd.
Auto top-up
Keep your wallet from running dry: when your balance falls below a threshold, AnyAPI charges your saved card for a fixed amount, automatically.- Enabling requires a saved card: make one top-up first and choose to save your payment
method at checkout (
hasPaymentMethodon the GET tells you where you stand). - Amounts are whole dollars;
amountUsdrespects the same minimum as a manual top-up. - Auto top-ups appear in your transactions like any other top-up. Burst protection prevents duplicate charges, and repeated card failures pause the feature rather than retrying forever.
- Configure it in the dashboard under Credits → Auto top-up.