Wan API balance endpoint
Check your Wan API account balance and your key’s remaining limit with GET /v1/balance. It works for every model.
This endpoint works for every model. Send your key as Authorization: Bearer YOUR_API_KEY to https://api.wanapi.app. It returns the balance of the account that owns the key and never changes data.
GET /v1/balance returns the spendable balance of the key’s account. It is read-only.
curl https://api.wanapi.app/v1/balance \
-H "Authorization: Bearer $WAN_API_KEY"{
"object": "balance",
"currency": "USD",
"balance": 12.5,
"key_remaining": null
}| Field | Meaning |
|---|---|
object | Always balance. |
currency | Always USD. |
balance | Spendable account balance in USD. Playground and every API key of the account share it. |
key_remaining | Remaining limit of this key in USD, or null when the key has no limit. A key cannot spend more than either amount. |
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | — | The API key is missing, invalid, disabled or expired. |
| 503 | balance_unavailable | Try again later. |