Get Effective Limit
Endpoint
GET /apiops/projects/{projectName}/ai-budgets/hierarchy/{nodeType}/{nodeId}/effective-limit/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| nodeType | string | Yes | Node type: CREDENTIAL, CREDENTIAL_ORGANIZATION, API_PROXY or PROJECT |
| nodeId | string | Yes | Entity ID of the node (the nodeId / owner id from a hierarchy or scope-rules read) |
The ownership chain resolved for each nodeType:
| nodeType | Chain resolved (top-down) |
|---|---|
CREDENTIAL | leaf binding → org chain → app cap → tenant cap |
CREDENTIAL_ORGANIZATION | own budget → parent org chain → tenant cap |
API_PROXY | aiAppBudget → tenant cap |
PROJECT | aiTenantBudget only |
Query Parameters
None
Response
Success Response (200 OK)
resultList contains a single effective-limit object. The effective*Tokens fields are the resolved
min(...) across the applicable chain; a null field means no limit is configured across the chain.
{
"status": "SUCCESS",
"resultList": [
{
"credentialLeafTokensPerMonth": null,
"orgChain": [
{
"orgId": "665f1a2b3c4d5e6f7a8b9c1a",
"orgName": "engineering-team",
"tokensPerMonth": 2000000
}
],
"appCapTokensPerMonth": 3000000,
"tenantCapTokensPerMonth": 10000000,
"effectiveMonthlyTokens": 2000000,
"effectiveDailyTokens": 500000,
"effectiveMinuteTokens": null,
"status": "NORMAL"
}
],
"resultCount": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | Contains the single effective-limit object |
| resultCount | integer | Always 1 on success |
Effective Limit Object Fields
| Field | Type | Description |
|---|---|---|
| credentialLeafTokensPerMonth | integer | Monthly cap at the leaf credential binding (CREDENTIAL node only). null if not set |
| orgChain | array | Org-chain entries (top-down). Empty for non-credential nodes |
| appCapTokensPerMonth | integer | AI-proxy app cap (aiAppBudget.tokensPerMonth). null if not set / not applicable |
| tenantCapTokensPerMonth | integer | Project tenant cap (aiTenantBudget.tokensPerMonth). null if not set |
| effectiveMonthlyTokens | integer | Resolved effective monthly limit = min(all non-null values above). null = no limit configured |
| effectiveDailyTokens | integer | Resolved effective daily limit. null if not configured |
| effectiveMinuteTokens | integer | Resolved effective per-minute limit. null if not configured |
| status | string | Status derived from budget state: NORMAL, LOCKED or AT_CAPACITY |
Org Chain Entry Fields
| Field | Type | Description |
|---|---|---|
| orgId | string | Credential-organization ID |
| orgName | string | Credential-organization name |
| tokensPerMonth | integer | Monthly cap contributed by this org. null if not set |
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Effective limit for node (CREDENTIAL/665f1a2b3c4d5e6f7a8b9c3c) was not found!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/ai-budgets/hierarchy/CREDENTIAL/665f1a2b3c4d5e6f7a8b9c3c/effective-limit/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- No license gate: These endpoints do not check the
AI_GATEWAYlicense module. The API layer of Apinizer applies no module gate at all, so an installation whose license does not name AI Gateway reads and writes AI budgets through this resource exactly like a licensed one. Permission is the only gate: the caller still needs theAI_BUDGETSasset category (VIEWfor reads,MANAGEfor writes), and a missing permission is reported as a400 Bad Requestvalidation error like everywhere else in APIops. The AI Gateway screens in the Manager UI remain hidden without the module. - Manager-side preview only: This is a read-only preview that computes
min(non-null tokensPerMonth)across the ownership chain. It does not replicate the worker-side Hazelcast reservation logic; the runtime gateway enforcement may differ under live concurrency. nodeIdis an entity ID: Take it from a hierarchy (nodeId) or scope-rules (id/scopeRef) read. A node that cannot be resolved returns400 Bad Requestwith awas not found!message.nodeTypeis case-sensitive: Use one ofCREDENTIAL,CREDENTIAL_ORGANIZATION,API_PROXY,PROJECT.orgChainonly for credential nodes: ForAPI_PROXYandPROJECTnodes theorgChainis empty.nullmeans unlimited: AnulleffectiveMonthlyTokensmeans no cap is configured anywhere in the chain, not zero.- No
_class: The response DTO carries no MongoDB_classdiscriminator. - Permission: Requires
AI_BUDGETS+VIEWin the project.
Related Documentation
- Get Budget Hierarchy - Source of
nodeIdvalues - Get Budget Scope Rules - Flat owner list
- Update Budget - Change an owner budget
- AI Budgets / Quota API - Resource overview