> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Traces

> Retrieve traces for an inference result.

## Returns

Returns a list of [Trace](/concepts/product/version/session/trace) objects.

## Example

```python theme={"system"}
traces = galtea.traces.list(inference_result_id=inference_result_id)
```

## Parameters

<ResponseField name="inference_result_id" type="string | list[string]" optional>
  Filter traces by inference result ID(s).
</ResponseField>

<ResponseField name="session_id" type="string | list[string]" optional>
  Filter traces by session ID(s).
</ResponseField>

<ResponseField name="types" type="list[string | TraceType]" optional>
  Filter traces by type. Options: `SPAN`, `GENERATION`, `EVENT`, `AGENT`, `TOOL`, `CHAIN`, `RETRIEVER`, `EVALUATOR`, `EMBEDDING`, `GUARDRAIL`. Other string values are sent to the API unchanged, so values added in newer API versions can be used; the API rejects invalid ones.
</ResponseField>

<ResponseField name="names" type="list[string]" optional>
  Filter traces by name.
</ResponseField>

<ResponseField name="from_start_time" type="str | int" default="None">
  Filter traces started at or after this timestamp. Accepts ISO 8601 string (e.g., `'2024-01-01T00:00:00Z'`) or Unix timestamp in seconds. Can be used independently or together with `to_start_time`.
</ResponseField>

<ResponseField name="to_start_time" type="str | int" default="None">
  Filter traces started at or before this timestamp. Accepts ISO 8601 string (e.g., `'2024-12-31T23:59:59Z'`) or Unix timestamp in seconds. Can be used independently or together with `from_start_time`.
</ResponseField>

<ResponseField name="sort_by_start_time" type="string" optional>
  Sort traces by start\_time. Valid values: `asc`, `desc`.
</ResponseField>

<ResponseField name="offset" type="int" optional>
  Number of traces to skip for pagination. Default: `0`.
</ResponseField>

<ResponseField name="limit" type="int" optional>
  Maximum number of traces to return. Default: `10000`.
</ResponseField>

<ResponseField name="id" type="string | list[string]" default="None">
  The ID or IDs of the trace(s) to retrieve.
</ResponseField>

<Note>
  At least one of `inference_result_id`, `session_id`, or `id` must be provided.
</Note>
