Modbot Docs
APIAPI referenceAI settings

Update team AI allowances

PUT/api/settings/ai/allowances

Set how many tokens and how many US dollars each team member may use in a month: one default for every member and, where wanted, an allowance of a member's own. A change is recorded in the audit log.

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/allowances" \  -H "Content-Type: application/json" \  -d '{    "default": null,    "members": 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"  }}

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.