API ReferenceEndpointsWorkspaces
Give an AI key a new secret
Replace the key's secret; the old one stops working at once. Limits, models and history stay. The new secret is returned only this once.
Authorization
cloady AuthorizationBearer <token>
Personal API token (cldy_…)
In: header
Path Parameters
workspaceSlug*string
keyId*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/workspaces/string/ai/keys/string/rotate"{ "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 }, "secret": "string"}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).
Read AI gateway usage GET
Requests, errors, tokens and median latency over the last 24 hours, hourly spend by model and the models used, from the request log; and this month's spend against the budget. With `key`, only that key's.