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.
Manual top-ups
Add between $10 and $10,000 from Credits → Buy credits in the dashboard. Every dollar you pay adds one dollar of wallet spending power. AnyAPI does not add a top-up fee. Choosing an amount sends you to Stripe’s secure hosted checkout page, which can show payment methods you saved previously. You can also choose to save a reusable method during payment, and Stripe returns you to the dashboard when you are done. AnyAPI waits for the verified payment event before updating your wallet, so a browser redirect or URL parameter alone never grants funds. Some payment methods settle later; the dashboard keeps checking your balance and shows a delayed state until the top-up lands. Successful full and partial refunds reduce the wallet by the refunded amount. A dispute reduces the wallet when it opens, even when that makes the balance negative. Winning the dispute restores the disputed amount; losing it does not apply another debit.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 reusable payment method. Make a manual top-up first and select
Stripe’s save option (
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.