GET /key
The spend, budget, rate limit and expiry of the API key that makes the request.
GET
/api/v1/keyAPI keyReturns the settings and the spend of the key that calls it. It never shows the payer's balance.
Response
{
"data": {
"label": "production",
"usage": 1.2345,
"limit": 10,
"limit_reset": "monthly",
"expires_at": null,
"is_free_tier": false,
"rate_limit": { "requests": null, "interval": "1m" },
"currency": "PnP"
}
}| Field | |
|---|---|
label | The key's name. |
usage | PnP spent in the current budget period. |
limit | The key budget in PnP; null without a budget. |
limit_reset | daily, weekly, monthly (00:00 Moscow time) or null. |
expires_at | When the key stops working, or null. |
rate_limit.requests | Requests per minute set on the key; null means the default limit, see Limits. |
Example
curl -s https://router.nodul.ru/api/v1/key -H "Authorization: Bearer $NODUL_ROUTER_API_KEY"