Change an AI key
Change a key's name, models, budget or rate limit, or pause and resume it. Its owner may, and so may an admin for a key pinned to this workspace (a token needs full scope).
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/workspaces/string/ai/keys/string" \ -H "Content-Type: application/json" \ -d '{}'{ "key": { "id": "string", "name": "string", "prefix": "string", "owner": { "id": "string", "name": "string", "email": "string" }, "mine": true, "pinned": true, "aiOnly": true, "capabilities": [ "read" ], "sharedWith": "string", "models": "all", "budgetCents": 0, "rpm": -9007199254740991, "status": "active", "reason": "string", "spentMicros": 0, "requests24h": 0, "lastUsedAt": "string", "expiresAt": "string", "createdAt": "string", "editable": true }}Create an AI key POST
Create an API token that can only call the AI gateway, pinned to this workspace (developer role; a token needs full scope). It appears in Account → API tokens like any other token. The secret is returned only this once.
Revoke an AI key DELETE
Revoke a key that can only call the AI gateway. A token that can also do other things keeps them and only loses AI access. Its owner may, and so may an admin for a key pinned to this workspace (a token needs full scope).