Read the AI gateway's request log
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.
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)$uuidValue in
- "all"
- "errors"
- "limited"
length <= 200Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/ai/logs"{ "entries": [ { "id": "string", "at": "string", "key": "string", "keyName": "string", "requested": "string", "model": "string", "fallback": true, "provider": "string", "status": 0, "error": "string", "input": 0, "output": 0, "micros": 0, "free": true, "ms": 0, "stream": true, "text": true } ], "available": true, "prompts": true, "retentionDays": 0}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.
Read a logged prompt GET
The prompt and response kept for one request of the log, when prompt logging was on (developer role). `at`, the entry's time from listAiLogs, narrows the search; without it the whole retention period is read.