Update AI spend limits
PUT
/api/settings/ai/limitsReplace the AI spend limits.
Needs the ManageSettings permission.
AuthorizationBearer <token>
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://example.com/api/settings/ai/limits" \ -H "Content-Type: application/json" \ -d '{ "limits": null }'{ "now": "2019-08-24T14:15:22Z", "today": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "month": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "spend": [ { "feature": "string", "label": "string", "today": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "week": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "month": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "lastMonth": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "estimate": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 } } ], "total": { "feature": "string", "label": "string", "today": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "week": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "month": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "lastMonth": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "estimate": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 } }, "firstDay": "2019-08-24", "lastDay": "2019-08-24", "days": [ { "day": "2019-08-24", "feature": "string", "cost": 0.1, "tokens": 0, "unpricedTokens": 0 } ], "limits": [ { "appliesTo": "string", "feature": null, "roleId": null, "userId": null, "name": null, "perDay": null, "perMonth": null, "today": null, "month": null, "estimate": null } ], "tokenLimits": [ { "feature": "string", "monthlyTokens": 0, "month": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "estimate": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 } } ], "topChatUsers": [ { "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "username": null, "month": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 } } ], "prices": [ { "model": "string", "inputPerMillion": 0.1, "cachedInputPerMillion": null, "outputPerMillion": 0.1 } ], "models": [ { "model": "string", "entered": null, "fetched": null } ], "pricesFetchedAt": null, "modelsUsed": [ "string" ], "features": [ { "id": "string", "label": "string" } ], "roles": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } ], "users": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } ], "allowances": { "default": { "tokens": null, "money": null }, "members": [ { "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "name": "string", "own": null, "allowance": { "tokens": null, "money": null }, "month": { "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0 }, "pastLimits": true } ], "resetsAt": "2019-08-24T14:15:22Z" }}