Create a token
- Open Settings → Security → Management API tokens.
- Select New token, enter a name, and choose Usage only — view subscription quotas.
- Choose an expiration and copy the secret when it is shown. It is shown only once.
Read subscription usage
activeandstatedescribe subscription status. Active status alone does not mean quota remains.dailyInputTokensandweeklyInputTokenscount input tokens, not requests or dollars.dailyImagescounts images.- Each quota includes
used,remaining,percentUsed(a fraction; multiply by 100 for display), andresetAt(UNIX epoch milliseconds).percentUsedcan exceed 1. - A null quota/limit means that window is not configured or applicable. If a lookup is unavailable, the quota’s counters are null and
degraded: true; display unknown, not zero usage or a full allowance. period.currentPeriodEndis an ISO timestamp or null. Use the returned reset times instead of hardcoding billing or quota windows.- Token-based trials also return
usageUnits: "tokens",tokenLimits.total, and atokensquota object.
Verify a Usage only token
After creating a token with onlyusage:read, check that it can read quotas:
200 with the usage fields described above. An inactive subscription can
still return a successful response; check active, state, and the quota fields
instead of assuming that HTTP success means included usage is available.
Then check its permission boundary with a read-only API-key list request:
usage:read must return 403 with insufficient_scope here.
If it returns 200, the token has API-key read or write permissions too; create a
token with only Usage only access for your monitoring tool.
Missing, invalid, expired, or revoked management tokens return 401 with
invalid_management_token. To check revocation, revoke a disposable test token
in Settings and repeat the usage request; it should return 401. Keep the token
out of screenshots and logs.
Permissions
API-key scopes do not include
usage:read. Existing tokens do not gain new permissions. Create a new token when you need a different scope. For monitoring, select only usage:read: a token with api_keys:write can create keys that spend money.
API-key management
Base URL:https://nano-gpt.com/api/management/v1. Authenticate with Authorization: Bearer sk-nano-mgmt-....
Creating an inference key requires an
Idempotency-Key header. The new key secret is returned only on creation and an exact idempotent replay. List, read, and update responses do not return it.
See the Management OpenAPI contract for request and response schemas. Ordinary inference API keys cannot call the Management API.
Errors
401: missing, invalid, expired, or revoked management token.403withinsufficient_scope: create a token with the required scope.429: rate limited; respectRetry-After.503: temporarily unavailable; retry with backoff and respectRetry-Afterwhen present.
X-Request-Id for troubleshooting; never log the authorization header.