Create Global Token Limit Settings
This page uses Nexus's generated request and response schema. Requests still require the correct account, workspace, and resource permissions.
/admin/token-rate-limits/globalcurl --request POST 'https://school.narb.cc/api/admin/token-rate-limits/global' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"enabled": false,
"period_hours": 1
}'This builds a request example. Fill in required query values, then replace path placeholders and YOUR_TOKEN in your own environment. Use a token for a user with access to this workspace. Responses and permissions depend on your account and deployment. Never paste a private token into documentation.
Download the Nexus OpenAPI schema ↗
Import the schema into your API client. It describes the backend source; enabled routes depend on your workspace.
Authentication and scope#
Send requests to the workspace that owns the resource. Authentication does not by itself grant a school membership, class assignment, or administrator permission. School endpoints apply their role and class checks on the server.
Use a credential issued for that workspace with only the permissions your integration needs. Keep it on your server. Do not place credentials in a public website or a shared skill.
Parameters#
| Name | Location | Required | Type |
|---|---|---|---|
tenant_id | query | No | string or null |
The tenant_id parameter is part of the engine schema. It does not authorize a caller to another school. Use the workspace and permissions assigned to your account.
Request body#
Content type: application/json.
| Field | Type | Required | Details |
|---|---|---|---|
enabled | boolean | Yes | See Request schema. |
token_budget | integer or null | No | See Request schema. |
period_hours | integer | Yes | See Request schema. |
cost_budget_cents | number or null | No | See Request schema. |
Request schema#
The schema includes field limits and required values. Referenced types are included in the downloadable OpenAPI file. Replace example identifiers with IDs from your workspace.
{
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled"
},
"token_budget": {
"anyOf": [
{
"type": "integer",
"maximum": 1000000000.0,
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Token Budget"
},
"period_hours": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Period Hours"
},
"cost_budget_cents": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Cost Budget Cents"
}
},
"type": "object",
"required": [
"enabled",
"period_hours"
],
"title": "TokenRateLimitArgs"
}Responses#
200#
Successful Response
{
"properties": {
"token_id": {
"type": "integer",
"title": "Token Id"
},
"enabled": {
"type": "boolean",
"title": "Enabled"
},
"token_budget": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Token Budget"
},
"period_hours": {
"type": "integer",
"title": "Period Hours"
},
"cost_budget_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Cost Budget Cents"
}
},
"type": "object",
"required": [
"token_id",
"enabled",
"token_budget",
"period_hours",
"cost_budget_cents"
],
"title": "TokenRateLimitDisplay"
}422#
Validation Error
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}Access and error handling#
A signed-out or expired session needs authentication. A denied request can mean the account lacks permission, class membership, an approved model, or an available allowance. Do not retry a write blindly after a network failure; first check whether it was recorded.
Treat validation errors as a request problem. Use the returned field details to correct the request. Resource identifiers do not confer access.
Schema version#
Generated from Nexus backend source fe1c3a07c793029d3d87191a68f89e481afd6bc8. Check your deployed version before integrating. Schema coverage is not a live acceptance test.