See what your models were used for
Read your models' requests and tokens by day, model, project and caller, and find one request in the request log.
See how much your organization's or a project's models were used, and look up a single request, such as one that failed. To do it, you need any basic role, LLM Gateway Admin or LLM Gateway User on the organization or the project.
kosem records each request's caller, model, outcome, duration and tokens, never its prompt or answer.
See usage
- In your organization or project, click LLM Gateway, and then Usage.
- Use the filter bar to select the days, in UTC: this month, unless you select the last 7 or 30 days or last month. Filter by model, caller and, in an organization, project.
The page shows requests, with how many failed and how many kosem refused, input and output tokens, the cache hit rate, the error rate and the time to the first token. Its tables break them down by project, model, agent and caller. The address keeps the filters, so you can share the view.
Find a request
- In your project, click LLM Gateway, and then Requests.
- Use the filter bar to narrow the list by model, time, caller or outcome.
- Click a request to see its details: tokens, duration, the provider's status and request ID, and its error if it failed.
The log shows requests newest first, kept for your plan's retention window (Limits and quotas).
Find a request by its ID
Every answer of the gateway has the header Kosem-Request-Id, such as req_01m5rc4tq2e9vbt6g0d4x7qz1m. Log it beside your own request IDs to look a request up later. Set your API key (Call the API) and your project's ID first:
export KOSEM_API_KEY='kosem_sk_…'
export KOSEM_PROJECT='prj_01m5r9dh9mf0ps98ktkap3562c'
curl -s "https://api.kosem.ai/v1/projects/$KOSEM_PROJECT/llmRequests/req_01m5rc4tq2e9vbt6g0d4x7qz1m" \
-H "Authorization: Bearer $KOSEM_API_KEY"{
"name": "projects/prj_01m5r9dh9mf0ps98ktkap3562c/llmRequests/req_01m5rc4tq2e9vbt6g0d4x7qz1m",
"alias": "fast",
"providerModel": "claude-haiku-4-5",
"principal": "serviceAccount:sa_01m5rbx4k2e9vbt6g0d4x7qz1n",
"operation": "openai.chat_completions",
"outcome": "ANSWERED",
"providerStatus": 200,
"inputTokens": 8,
"outputTokens": 9,
"durationMs": 412,
"upstreamRequestId": "req_011CVa4oKn7cRrv7yU8kQx2Z"
}upstreamRequestId is the provider's own ID for it, to give the provider's support.
Query usage with the API
Sum a project's requests and tokens by model, this month (using KOSEM_API_KEY and KOSEM_PROJECT from above):
curl -s "https://api.kosem.ai/v1/projects/$KOSEM_PROJECT/llmUsage?groupBy=MODEL" \
-H "Authorization: Bearer $KOSEM_API_KEY"startDate and endDate, such as 2026-11-01, select other days, and groupBy takes DATE, PROJECT, MODEL or PRINCIPAL. The API reference lists the rest.