/api/gateway/keys/{api_key_id}/limitsRead one key's effective limits
Returns the spend cap and request/token windows that govern this key on platform-funded lanes, defaults included. source: tier means the windows come from the organization's rate-limit tier; explicit means a per-key limits row supplies them. A null cap or window is uncapped. A key of another organization answers 404, indistinguishable from a missing one.
Authentication: Bearer API key in the Authorization header
Path parameters
api_key_idstringrequiredThe key's id (the
idfield fromGET /api/keys), not its secret.
Responses
200The key's effective limits.
Response
api_key_idstringrequireddaily_spend_cap_nano_usdinteger | nullrequiredSpend cap in integer nano-USD (1 USD = 1,000,000,000) over
spend_cap_period(the name predates the periods). Null is uncapped.spend_cap_periodenumrequiredThe UTC window the spend cap counts over. Daily when no explicit row exists.
requests_per_minuteinteger | nullrequiredtokens_per_minuteinteger | nullrequiredtokens_per_hourinteger | nullrequiredtokens_per_dayinteger | nullrequiredtierstringrequiredThe organization's resolved rate-limit tier key (for example
tier_2).sourceenumrequiredexplicit: a per-key limits row supplies the windows.tier: they come from the organization's tier.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
Request
curl https://api.experientiallabs.ai/api/gateway/keys/6d1f8a2b-4c3e-4f5a-9b7c-2e8d0a1f3b4c/limits \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"api_key_id": "6d1f8a2b-4c3e-4f5a-9b7c-2e8d0a1f3b4c",
"daily_spend_cap_nano_usd": 25000000000,
"spend_cap_period": "daily",
"requests_per_minute": 120,
"tokens_per_minute": 400000,
"tokens_per_hour": null,
"tokens_per_day": null,
"tier": "tier_2",
"source": "explicit"
}https://api.experientiallabs.ai/api/gateway/keys/6d1f8a2b-4c3e-4f5a-9b7c-2e8d0a1f3b4c/limits