---
title: "Get project session"
method: GET
path: "/v1/projects/{projectSlug}/sessions/{sessionId}"
tags: ["Sessions"]
---

# Get project session

`GET /v1/projects/{projectSlug}/sessions/{sessionId}`

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

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `sessionId` string, required — Session identifier lifted from instrumentation. Up to 128 characters.

## Response `200`

Session detail

- SessionDetail
  - `organizationId` string, required — Organization that owns this session.
  - `projectId` string, required — Project this session belongs to.
  - `sessionId` string, required — Session identifier set by the SDK. Groups the traces of one conversation.
  - `traceCount` integer, required — Number of traces in the session.
  - `traceIds` string[], required — Identifiers of the traces that make up the session.
  - `spanCount` integer, required — Total number of spans across the session's traces.
  - `errorCount` integer, required — Number of spans flagged with an error status.
  - `startTime` string, required — ISO-8601 timestamp of the session's earliest span.
  - `endTime` string, required — ISO-8601 timestamp of the session's latest span.
  - `lastActivityTime` string, required — ISO-8601 timestamp of the session's most recent span start.
  - `durationNs` number, required — Active execution time of the session in nanoseconds, not wall-clock.
  - `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 the session's LLM spans.
  - `tokensOutput` number, required — Total output tokens across the session's 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).
  - `userId` string, nullable, required — End-user identifier set by the SDK. `null` when absent.
  - `userEmail` string, nullable, required — End-user email set by the SDK. `null` when absent.
  - `simulationId` string, nullable, required — CUID of the simulation that produced this session. `null` when not a simulation.
  - `tags` string[], required — Free-form tags attached at ingest time.
  - `metadata` object, required — Free-form metadata attached at ingest time.
  - `models` string[], required — Model identifiers seen across the session's LLM spans.
  - `providers` string[], required — LLM-provider identifiers seen across the session's spans.
  - `serviceNames` string[], required — OpenTelemetry `service.name` values seen in the session.
  - `agentNames` string[], required — Agent names seen across the session's spans.
  - `definedTools` string[], required — Tool names declared available across the session's spans.
  - `rootSpanId` string, nullable, required — Identifier of the session'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.
  - `latestTraceId` string, nullable, required — Identifier of the trace that produced the session's latest output. `null` when no trace produced output.
  - `conversation` GenAIMessage[], required — Conversation of the session, in OpenTelemetry GenAI format: the system instructions, then the messages of the session's latest LLM completion, followed by its 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/revisions/2ce07f01d6c2/schema)
