> For the complete documentation index, see [llms.txt](https://infronai.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infronai.gitbook.io/docs/observability/request-tracking.md).

# Request Tracking

Request Tracking lets you add optional identifiers to each API request, making it easier to find, filter, and analyze requests by user, session, application, or tag in Logs, Usage & Activity, and the Analytics API.

## Tracking fields

Add any of these optional fields at the top level of a request body: `user_id`, `session_id`, `app_id`, and `tag`. Each value must be a string of no more than 64 characters. The fields can be used independently.

## Supported APIs

Request Tracking is available across:

* Text generation, including OpenAI Chat Completions, Anthropic Messages, and OpenResponses
* Image, audio, and video generation
* Embeddings and rerank
* Search APIs

## Example

{% code collapsedlinecount="10" %}

```bash
curl https://llm.onerouter.pro/v1/chat/completions \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5.5",
    "messages": [
      {
        "role": "user",
        "content": "Summarize this support ticket."
      }
    ],
    "user_id": "customer_123",
    "session_id": "ticket_456",
    "app_id": "support-copilot",
    "tag": "ticket-summary"
  }'
```

{% endcode %}

## Find and analyze requests

* In [**Logs**](https://infron.ai/dashboard/logs), filter requests by User ID, Session ID, App ID, or Tag. These fields also appear in the request table and Log Details.

<figure><img src="https://3822312837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9C9AjT7j46HAcQrOVWw%2Fuploads%2FIVAfeUn5FIHpfST5Kf22%2Fimage.png?alt=media&amp;token=f8fb215b-e33c-4db5-a580-142d7e9f4397" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3822312837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9C9AjT7j46HAcQrOVWw%2Fuploads%2FviQlEZywWvldlfpXaNbo%2Fimage.png?alt=media&amp;token=2ab35e03-ffdc-47b3-8fc1-55ae013ccdf6" alt=""><figcaption></figcaption></figure>

* In [**Usage & Activity**](https://infron.ai/dashboard/activity), use the same fields to filter usage statistics.

<figure><img src="https://3822312837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9C9AjT7j46HAcQrOVWw%2Fuploads%2FLo5wFa4SegVUmUHu2pLw%2Fimage.png?alt=media&amp;token=747017df-3e47-448b-b717-a5f087150685" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3822312837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ9C9AjT7j46HAcQrOVWw%2Fuploads%2FtJp9zRdbTVkbKwLX12FM%2Fimage.png?alt=media&amp;token=a541dbd6-51bd-43ea-8fb4-4396fc46e93f" alt=""><figcaption></figcaption></figure>

* In the [**Analytics API**](https://infron.ai/docs/billing-apis/analytics-api/query-analytics-data), use these fields as dimensions or filters.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://infronai.gitbook.io/docs/observability/request-tracking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
