# 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 [#see-usage]

1. In your organization or project, click **LLM Gateway**, and then **Usage**.
2. 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 [#find-a-request]

1. In your project, click **LLM Gateway**, and then **Requests**.
2. Use the filter bar to narrow the list by model, time, caller or outcome.
3. 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](/reference/limits#llm-gateway)).

## Find a request by its ID [#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](/get-started/call-the-api)) and your project's ID first:

```sh
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"
```

```json
{
  "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 [#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):

```sh
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](/reference/api) lists the rest.

## Related [#related]

- [LLM Gateway](/concepts/llm-gateway)
- [Call models from your code](/guides/llm-gateway/call-models-from-code)
