List LLM requests
Lists the requests to a project's models, newest first, without their prompts or answers. With the project - and an organization filter, lists them across the organization's projects: those of every project the caller holds llmgateway.requests.list on. Only the requests of as many days as the organization's plan keeps are listed (llmgateway.requestLogDays: 7 on Hobby, 30 on Pro, 90 on Team and Enterprise).
Lists the requests to a project's models, newest first, without their prompts or answers.
With the project - and an organization filter, lists them across the organization's projects: those of every project the caller holds llmgateway.requests.list on. Only the requests of as many days as the organization's plan keeps are listed (llmgateway.requestLogDays: 7 on Hobby, 30 on Pro, 90 on Team and Enterprise).
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID, or - for the projects of the organization that filter names.
^(-|prj_[0-7][0-9a-hjkmnp-tv-z]{25})$pageSize?integerMaximum number of items to return. Defaults to 50; values above 500 are treated as 500.
int320 <= valuepageToken?stringPage token from a previous response.
filter?stringComparisons joined by AND (AIP-160): organization = "organizations/{organization_id}", required with the project -, and only then; model, principal, source and operation with = and a quoted string, such as principal = "serviceAccount:sa_…"; outcome with = and an outcome, or with != as often as needed, such as outcome != CALLER_LEFT; failed = true for requests that did not end in a successful answer, and failed = false for those that did, where a caller leaving is neither; time with >=, >, <= or < and a quoted RFC 3339 timestamp, compared with startTime.
length <= 2048OK
application/json- response
llmRequests*array<>Requests, newest first.
nextPageToken*stringToken for the next page; empty on the last page.
curl -X GET 'https://api.kosem.ai/v1/projects/string/llmRequests'{
"llmRequests": [
{
"alias": "string",
"cacheReadTokens": 0,
"cacheWriteTokens": 0,
"cost": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"durationMs": 0,
"errorCode": "string",
"errorMessage": "string",
"firstTokenLatencyMs": 0,
"inputTokens": 0,
"model": "string",
"name": "string",
"operation": "string",
"outcome": "ANSWERED",
"outputTokens": 0,
"principal": "string",
"provider": "string",
"providerModel": "string",
"providerStatus": 0,
"providerType": "string",
"reasoningTokens": 0,
"requestFormat": "ANTHROPIC_MESSAGES",
"source": "string",
"sourceModel": "string",
"startTime": "2019-08-24T14:15:22Z",
"stream": true,
"upstreamRequestId": "string",
"usageEstimated": true,
"userAgent": "string"
}
],
"nextPageToken": "string"
}