# Page through the messages a model call in a session's trace was sent, with each message's full content.

Source: <https://everruns.com/docs/api/operations/list_session_trace_request/>

GET

/v1/sessions/{session\_id}/trace/turns/{turn}/steps/{step}/request

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/trace/turns/example/steps/example/request';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/sessions/example/trace/turns/example/steps/example/request
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/trace/turns/{turn}/steps/{step}/request

## Parameters

### Path Parameters

**session\_id**

required

string

Prefixed public identifier

**turn**

required

string

Prefixed public identifier

**step**

required

string

Prefixed public identifier

### Query Parameters

**role**

string

Only messages of this role: `system`, `user`, `assistant` or `tool`.

**offset**

integer format: int32

First message index. Defaults to 0.

**limit**

integer format: int32

Messages per page, 1 to 200. Defaults to 100.

**full**

boolean

Return every message’s content whole, however large.

**native**

boolean

Also return the provider request body as the driver sent it.

## Responses

### 200

Success

Media typeapplication/json

A page of a model request’s messages.

object

**has\_native\_request**

required

Whether the provider request body was recorded for this call.

boolean

**message\_count**

required

Messages sent in the call.

integer format: int32

**messages**

required

Requested messages, in order.

Array\<object>

One message of a model request.

object

**content**

The whole message, when asked for and within the limit.

**index**

required

Position in the request.

integer format: int32

**preview**

required

Start of the message text.

string

**role**

required

Role as handed to the provider driver: `system`, `user`, `assistant` or `tool`. Stored messages say `agent` and `tool_result`; each driver then maps these four onto its own wire format.

string

**size\_bytes**

required

Size of the serialized message.

integer

**model**

Model that served the call.

string | null

**native\_request**

The request body exactly as the driver sent it to the provider, with inline media and reasoning replay state replaced; only when asked for with `native`, on the first page.

**new\_from**

required

Messages before this index were already in the previous call.

integer format: int32

**provider**

Provider that served the call.

string | null

**request\_options**

Request options sent with the call (temperature, caching, …); on the first page only.

**tools**

required

Tools offered in the call; on the first page only.

Array\<object>

A tool offered to a model call.

object

**description**

Tool description the model sees.

string | null

**name**

required

Tool name the model sees.

string

**usage**

One of:

* object

  Token usage of the call, split by prompt cache.

  object

  **cache\_creation\_tokens**

  required

  Prompt tokens written to the provider’s cache.

  integer format: int64

  **cache\_read\_tokens**

  required

  Prompt tokens read from the provider’s cache.

  integer format: int64

  **cache\_reset**

  One of:

  * object

    Set when this call lost most of the prompt prefix the previous model call had cached.

    object

    **idle\_seconds**

    required

    Seconds between the end of the previous call and the start of this one.

    integer format: int64

    **lost\_tokens**

    required

    How many of those this call did not read back.

    integer format: int64

    **previous\_cached\_tokens**

    required

    Prompt tokens the previous call left in the cache (read plus written).

    integer format: int64

    **reason**

    required

    Likely cause, the first difference found: `model_changed`, `tools_changed`, `system_changed`, `history_changed`, `expired` (idle longer than the cache retention), or `unknown`.

    string

  * null

    null

  **cached\_through**

  Estimated index of the last message inside the cached prefix: the cache-read share of the prompt laid over the messages by size. `-1` when only the tools fit; absent when nothing was read from cache.

  integer | null format: int32

  **caching\_would\_help**

  A long prompt sent with caching off that neither read nor wrote the cache: turning on prompt caching would likely make calls like it cheaper.

  boolean

  **input\_tokens**

  required

  Prompt tokens neither read from nor written to the cache.

  integer format: int64

  **output\_tokens**

  required

  Completion tokens.

  integer format: int64

  **prompt\_cache**

  How prompt caching was requested, such as `auto` or `anthropic_cache_control`; absent when caching was off.

  string | null

* null

  Set when this call lost most of the prompt prefix the previous model call had cached.

  object

  **idle\_seconds**

  required

  Seconds between the end of the previous call and the start of this one.

  integer format: int64

  **lost\_tokens**

  required

  How many of those this call did not read back.

  integer format: int64

  **previous\_cached\_tokens**

  required

  Prompt tokens the previous call left in the cache (read plus written).

  integer format: int64

  **reason**

  required

  Likely cause, the first difference found: `model_changed`, `tools_changed`, `system_changed`, `history_changed`, `expired` (idle longer than the cache retention), or `unknown`.

  string

* object

  null

* null

  null

##### Example

```json
{
  "has_native_request": true,
  "message_count": 14,
  "messages": [
    {
      "index": 12,
      "role": "tool",
      "size_bytes": 244
    }
  ],
  "new_from": 12,
  "provider": "openrouter",
  "tools": [
    {
      "description": "Read a file from the workspace.",
      "name": "read_file"
    }
  ],
  "usage": {
    "cache_creation_tokens": 0,
    "cache_read_tokens": 12529,
    "cache_reset": {
      "idle_seconds": 42,
      "lost_tokens": 18420,
      "previous_cached_tokens": 18420,
      "reason": "tools_changed"
    },
    "cached_through": 11,
    "input_tokens": 10295,
    "output_tokens": 197,
    "prompt_cache": "auto"
  }
}
```