---
title: "Request logs"
description: "The Logs page of the pirouter console lists this workspace's requests one by one. This page covers what each request records, how to find failed requests, how to match your own logs to the platform's records with X-Pi-Trace-Id, and how soon logs appear and how long they are kept."
canonical: "https://pirouter.ai/docs/logs"
last-updated: "2026-10-17"
lang: "en"
source: "content/docs/en/(start)/logs.mdx"
---

# Request logs

The Logs page of the pirouter console lists this workspace's requests one by one. This page covers what each request records, how to find failed requests, how to match your own logs to the platform's records with X-Pi-Trace-Id, and how soon logs appear and how long they are kept.

On the **Logs** page of the console you can look up requests one by one, filter them by status, model and API key, and match your own logs to the platform's records by trace ID.

## Open the Logs page

Click **Logs** in the console sidebar. The page lists every request this workspace made. Times are UTC.

The time range is **Today**, **7d**, **30d** or a **Custom range**; the default is **7d**. Logs search up to 31 days at a time, so **90d** is not available. Logs has no **24h** either; use **Today** or a custom range. For longer trends, see [Usage analytics](https://pirouter.ai/docs/usage.md).

Every member of the workspace can view the logs and the details of each request. Requests of other workspaces are never shown.

- [Open the console](https://app.pirouter.ai): app.pirouter.ai

![The Logs page for the last 7 days: status icons, model, token columns and cost](/docs/shots/logs-list.en.webp)

## What each request records

| Column                                                                | What it holds                                                                                                               |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Status**                                                            | The icon at the start of the row: succeeded, usage estimated, or the failure type                                           |
| **Time (UTC)**                                                        | When the request was made, to the second                                                                                    |
| **Model**                                                             | The model called, with a mark for the provider that served it                                                               |
| **Input**, **Output**, **Cache read**, **Cache write**, **Reasoning** | Token counts by kind                                                                                                        |
| **Cost**                                                              | What the request cost, in US dollars                                                                                        |
| **Latency**                                                           | From the gateway receiving the request to the upstream's first byte. For a non-streaming request this covers the whole call |
| **API key**, **Trace**                                                | Hidden by default; turn them on in the **Columns** menu                                                                     |

- A row whose **Cost** reads **Not priced** was recorded without a price and nothing was charged. That is not the same as a row costing $0.00.

* When a request's token counts do not add up, the two cache columns read **Not split** instead of forcing a split.

### The details of one request

Click a row to open its details. The request's trace ID is at the top, with a copy button. Below it are three sections:

| Section     | What it holds                                                                                                       |
| ----------- | ------------------------------------------------------------------------------------------------------------------- |
| **Usage**   | Tokens by kind, the total, the cost, and the **Metering**: metered by the provider, or estimated                    |
| **Latency** | First token, generation, total time and throughput                                                                  |
| **Request** | Upstream status, finish reason, streaming, endpoint, API key, trace ID, **Upstream model** and **Upstream request** |

**Upstream model** and **Upstream request** hold the same values as the `X-Pi-Upstream-Model` and `X-Pi-Upstream-Request-Id` response headers. Quote the upstream request ID when you raise an issue with the provider.

![Details of a successful request: status, model and provider, key name and endpoint, then Usage and Latency](/docs/shots/logs-detail.en.webp)

### No request or response content

The logs do not record the content of requests or responses. The platform's request records have no field for prompts, completions or request bodies, and the console cannot show them. What the platform does record, and how long it keeps it, is on [Data policy & ZDR](https://pirouter.ai/docs/data-policy.md).

## Show only failed requests

The **Status** menu in the toolbar has two groups:

- **Outcome**: **All**, **Succeeded**, **Usage estimated** or **Any failure**, one at a time.
- **Failure type**: pick several; the list shows requests of any of the types you picked.

**Usage estimated** is not a failure: the upstream answered, but sent no usable usage report, so tokens and cost were estimated.

| Failure type             | Error codes                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Provider unavailable** | [`provider_unavailable`](https://pirouter.ai/docs/errors.md#provider_unavailable)                                                                                                                                                                                                                                                                                                                                                           |
| **Timed out**            | `upstream_timeout`; see [Timeouts](https://pirouter.ai/docs/errors.md#timeouts)                                                                                                                                                                                                                                                                                                                                                             |
| **Rate limited**         | [`rate_limited`](https://pirouter.ai/docs/errors.md#rate_limited)                                                                                                                                                                                                                                                                                                                                                                           |
| **Insufficient credits** | [`insufficient_balance`](https://pirouter.ai/docs/errors.md#insufficient_balance)                                                                                                                                                                                                                                                                                                                                                           |
| **Key rejected**         | [`invalid_api_key`](https://pirouter.ai/docs/errors.md#invalid_api_key), [`api_key_not_found`](https://pirouter.ai/docs/errors.md#api_key_not_found), [`api_key_revoked`](https://pirouter.ai/docs/errors.md#api_key_revoked), [`api_key_expired`](https://pirouter.ai/docs/errors.md#api_key_expired), `key_type_forbidden`                                                                                                                |
| **Invalid request**      | [`validation_failed`](https://pirouter.ai/docs/errors.md#validation_failed), [`invalid_request`](https://pirouter.ai/docs/errors.md#invalid_request), [`model_not_found`](https://pirouter.ai/docs/errors.md#model_not_found), `not_found`, [`no_eligible_provider`](https://pirouter.ai/docs/errors.md#no_eligible_provider), `upstream_rejected`, [`context_length_exceeded`](https://pirouter.ai/docs/errors.md#context_length_exceeded) |
| **Client disconnected**  | `client_disconnect`                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Platform error**       | [`internal_error`](https://pirouter.ai/docs/errors.md#internal_error) and every other code                                                                                                                                                                                                                                                                                                                                                  |

**Usage estimated** covers `malformed_usage` and `stream_downgraded`.

The details of a failed row show what the failure type means and the raw error code at the top, for example `rate_limited`. An error that is not in the error code list is shown as `internal_error`.

![The Status menu: Outcome options and the list of failure types](/docs/shots/logs-status.en.webp)

![Details of a failed request: Provider unavailable, what it means, and the provider\_unavailable code](/docs/shots/logs-detail-failed.en.webp)

## Filter by model and API key

These are the same controls as on the Activity page: **Model** takes several models, **API key** takes one key at a time. **Status**, model and key filters combine.

## Find a request by trace ID

Every pirouter response carries an `X-Pi-Trace-Id` header: successes, failures and the gateway's own refusals alike. Record it in your own logs and you can find the matching record on the Logs page. Quote the same value when you contact support.

1. **Get the trace ID**

   Add `-i` to curl, or read the response headers from your SDK's raw response.

   You should see an `X-Pi-Trace-Id` header. Copy its value.

2. **Search for it on the Logs page**

   Paste the value into **Search by trace ID** in the toolbar and press Enter or click **Search**.

   You should see every request with this trace ID, across all dates, and a note that filters and the time range are paused. The match is exact and case-sensitive, leading and trailing spaces are dropped, and the limit is 256 characters.

3. **Open the details**

   Click a row in the results.

   You should see the details of the request. When you are done, click **Clear search** to go back to the list.

One trace ID can match several rows. When a request fails before the first byte and the platform moves it to another deployment or model, each attempt gets its own row: a failed row costing $0.00 is an attempt that was taken over, and only the attempt that answered is billed. See [Model fallbacks](https://pirouter.ai/docs/fallbacks.md).

![Trace search mode: every request with the trace ID is shown, and filters and the time range are paused](/docs/shots/fallbacks-trace.en.webp)

## Share a request

Opening the details puts the row in the address bar (`?row=`). Send the link to a teammate: members of the same workspace can open that request directly.

## Pages and the total

A page holds 20 or 50 rows, 50 by default. Move with **Previous page**, **Next page**, **First page** and **Last page**; there is no jump to a page number. The total is counted separately and shown as "N total". When counting takes longer than 3 seconds the page shows **Count timed out**; the list and paging still work, and narrowing the dates or filters brings the total back.

## How soon requests appear and how long they are kept

A request usually shows up on the Logs page a few seconds after it is made.

Request records are kept for the most recent 18 months. A record past that cannot be opened on the Logs page; its details say it is no longer kept.

## Requests that are not in the logs

Only requests forwarded to a provider are logged. A request the gateway refused before forwarding it is neither logged nor counted in usage: an invalid key, an insufficient balance, an unknown model, a failed validation, no available provider, input over the context limit, or the platform's rate limit. For such a request, the `X-Pi-Trace-Id` of the response is what support needs to look into it.

## Not available today

- **Export, and an API for logs.** The Logs page has no export or CSV download, and the public API has no endpoint for reading logs.

* **Viewing request or response content.** The platform does not record it; see [No request or response content](https://pirouter.ai/docs/logs.md#no-request-or-response-content).
* **Searching by `X-Pi-Session-Id`.** The console does not show this value and cannot search by it.

## Next steps

- [Errors](https://pirouter.ai/docs/errors.md): What each error code means and what to do about it.
- [Usage analytics](https://pirouter.ai/docs/usage.md): Tokens, spend and requests by time, model and key.
