List the AI requests of a site
list_site_ai_requests
Lists the AI requests a site made, newest first, 50 to a page, with each one's model, status, tokens, credits and time taken.
The answer carries items and nextCursor. Pass nextCursor back as cursor for the next page, and it is null once there is nothing more. limit sets the page size, from 1 to 200.
Each item carries its id, when it was made (at), its kind (chat or embedding), the model it asked for and servedModel, the one that answered, which can differ from it, and stream, whether the answer was streamed. status is ok when it was answered, error when it failed and aborted when the answer was stopped partway, the Answered, Failed and Stopped of the History tab. httpStatus is the HTTP status it answered with, and errorCode the reason a failed one failed.
inputTokens and outputTokens are its tokens, credits what it cost, rounded to two decimals, so a short answer can show 0, and latencyMs how long it took. estimated is true when the provider reported no token counts, so they were estimated, which the tab marks Estimated. A failed request costs nothing, and a stopped one is charged for what was written until then.
Each request stays for 30 days and shows up a few seconds after it ends. Modulify keeps these counts only, never what your visitors asked or what the AI answered, so no tool can show them. get_site_ai_stats counts the same requests over a period. See Insights and history.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
cursor |
string | No | The nextCursor from the previous page. Omit it for the first page. |
limit |
integer | No | Requests per page, from 1 to 200. Defaults to 50. |