---
title: "Get project trace"
method: GET
path: "/v1/projects/{projectSlug}/traces/{traceId}"
tags: ["Traces"]
---

# Get project trace

`GET /v1/projects/{projectSlug}/traces/{traceId}`

Returns a single trace by id, including its `conversation`: the system instructions and the messages of the trace's last LLM-completion span, in OpenTelemetry GenAI format.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `traceId` string, required — 32-character trace identifier.

## Response `200`

Trace detail

- TraceDetail
  - `organizationId` string, required — Organization that owns this trace.
  - `projectId` string, required — Project this trace belongs to.
  - `traceId` string, required — 32-character trace identifier.
  - `spanCount` integer, required — Total number of spans in the trace.
  - `errorCount` integer, required — Number of spans flagged with an error status.
  - `startTime` string, required — ISO-8601 timestamp of the trace's earliest span.
  - `endTime` string, required — ISO-8601 timestamp of the trace's latest span.
  - `durationNs` number, required — Wall-clock duration of the trace in nanoseconds.
  - `timeToFirstTokenNs` number, required — Nanoseconds from the start of the first LLM span to its first emitted token. `0` if not measured.
  - `tokensInput` number, required — Total input tokens across LLM spans.
  - `tokensOutput` number, required — Total output tokens across LLM spans.
  - `tokensCacheRead` number, required — Total tokens served from the provider's prompt cache.
  - `tokensCacheCreate` number, required — Total tokens written to the provider's prompt cache.
  - `tokensReasoning` number, required — Total reasoning tokens reported by the model.
  - `tokensTotal` number, required — Sum of all token counters.
  - `costInputMicrocents` number, required — Cost of input tokens in microcents (100,000,000 per USD).
  - `costOutputMicrocents` number, required — Cost of output tokens in microcents (100,000,000 per USD).
  - `costTotalMicrocents` number, required — Total cost in microcents (100,000,000 per USD).
  - `sessionId` string, nullable, required — Conversation/session identifier set by the SDK. `null` when absent.
  - `userId` string, nullable, required — End-user identifier set by the SDK. `null` when absent.
  - `simulationId` string, nullable, required — CUID of the simulation that produced this trace. `null` when not a simulation.
  - `tags` string[], required — Free-form tags attached at ingest time.
  - `models` string[], required — Model identifiers seen across the trace's LLM spans.
  - `providers` string[], required — LLM-provider identifiers seen across the trace's spans.
  - `serviceNames` string[], required — OpenTelemetry `service.name` values seen in the trace.
  - `rootSpanId` string, nullable, required — Identifier of the trace's root span. `null` when no root span has been ingested.
  - `rootSpanName` string, nullable, required — `name` attribute of the root span. `null` when no root span has been ingested.
  - `positiveAnnotationCount` integer, required — Number of `passed = true` annotations attached to this trace.
  - `negativeAnnotationCount` integer, required — Number of `passed = false` annotations attached to this trace.
  - `metadata` object, required — Free-form metadata attached at ingest time.
  - `conversation` GenAIMessage[], required — Full conversation for the trace, in OpenTelemetry GenAI format: the system instructions, then the messages sent into the trace's last LLM-completion span (the running history at that point), followed by that span's generated output.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/latitude-dev/apis/latitude.md) · [All operations](https://skmtc.net/latitude-dev/apis/latitude/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/latitude-dev/latitude/versions/6a8789c59a5c/schema)
