Read AI gateway usage
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.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/ai/usage"{ "usage": { "available": true, "requests": 0, "errors": 0, "input": 0, "output": 0, "p50Ms": 0, "month": { "spentMicros": 0, "freeMicros": 0, "requests": 0 }, "budgetCents": 0, "hourly": { "models": [ "string" ], "series": [ [ 0 ] ] }, "models": [ { "model": "string", "requests": 0, "micros": 0, "p50Ms": 0 } ] }}Give an AI key a new secret POST
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.
Read the AI gateway's request log GET
The latest 90 requests, newest first, without their prompts. `status` narrows to `errors` (400 and above but 429) or `limited` (429); `q` matches the model or alias and the key's name. An entry whose prompt was kept says so in `text`; developers read it with readAiLogText.