---
title: "Retrieve Span"
method: GET
path: "/v1/spans/{spanUuid}"
tags: ["Tracing"]
---

# Retrieve Span

`GET /v1/spans/{spanUuid}`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/spans/{spanUuid}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/spans/:spanUuid/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a single, detailed span by its unique identifier.

## Path parameters

- `spanUuid` string, uuid, required

## Response `200`

Successfully retrieved the detailed span.

- RetrieveSpanResponse
  - `success` boolean, required: This is true if the span was successfully retrieved.
  - `data` union, required: The payload containing the detailed span data.
    - LlmSpan
      - `uuid` string: This is the unique identifier of the span.
      - `name` string: This is the name of the span.
      - `input` string: This is the input to the span.
      - `output` string: This is the output of the span.
      - `error` string: This is the error message, if an error occurred inside the span.
      - `status` 'SUCCESS' | 'ERRORED': This represents the error status of the span.
      - `startTime` string, date-time: This is the time the span started.
      - `endTime` string, date-time: This is the time the span ended.
      - `parentUuid` string, uuid: This is the unique identifier of the span's parent span.
      - `metadata` object: This is any additional metadata associated with the span.
      - `metricCollection` string: This is the metric collection to be used for evaluating the span.
      - `type` string: This is a string that represents the type of span.
      - `retrievalContext` string[]: This is the retrieval context of your span, which is to be used for evaluation.
      - `context` string[]: This is the ideal retrieval context of your span, which is to be used for evaluation.
      - `expectedOutput` string: This is the expected output of your span, which is the ideal actual output and to be used for evaluation.
      - `toolsCalled` ToolCallData[]: This is the tools called by your span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `expectedTools` ToolCallData[]: This is the expected tools to be called by the span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `model` string, required: This is the LLM model used in the span.
      - `provider` string: This is the provider of the generation model used in the span.
      - `integration` string: This is the integration associated with the span.
      - `promptAlias` string: This is the alias of your prompt which is stored on Confident AI.
      - `promptCommitHash` string: This is the hash of the current prompt being logged in the llm span.
      - `promptLabel` string: This is the label assigned to a specific version of prompt on the Confident AI platform.
      - `promptVersion` string: This is the version assigned to your prompt on Confident AI.
      - `costPerInputToken` number, float: This is the cost per input token of the LLM model.
      - `costPerOutputToken` number, float: This is the cost per output token of the LLM model.
      - `inputTokenCount` integer: This is the number of input tokens passed to the LLM model.
      - `outputTokenCount` integer: This is the number of output tokens generated by the LLM model.
    - RetrieverSpan
      - `uuid` string: This is the unique identifier of the span.
      - `name` string: This is the name of the span.
      - `input` string: This is the input to the span.
      - `output` string: This is the output of the span.
      - `error` string: This is the error message, if an error occurred inside the span.
      - `status` 'SUCCESS' | 'ERRORED': This represents the error status of the span.
      - `startTime` string, date-time: This is the time the span started.
      - `endTime` string, date-time: This is the time the span ended.
      - `parentUuid` string, uuid: This is the unique identifier of the span's parent span.
      - `metadata` object: This is any additional metadata associated with the span.
      - `metricCollection` string: This is the metric collection to be used for evaluating the span.
      - `type` string: This is a string that represents the type of span.
      - `retrievalContext` string[]: This is the retrieval context of your span, which is to be used for evaluation.
      - `context` string[]: This is the ideal retrieval context of your span, which is to be used for evaluation.
      - `expectedOutput` string: This is the expected output of your span, which is the ideal actual output and to be used for evaluation.
      - `integration` string: This is the integration associated with the span.
      - `toolsCalled` ToolCallData[]: This is the tools called by your span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `expectedTools` ToolCallData[]: This is the expected tools to be called by the span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `embedder` string, required: This is the embedder model used in the span.
      - `topK` integer: This is the top K chunks retrieved from your knowledge base.
      - `chunkSize` integer: This is the chunk size of each retrieved context.
    - ToolSpan
      - `uuid` string: This is the unique identifier of the span.
      - `name` string: This is the name of the span.
      - `input` string: This is the input to the span.
      - `output` string: This is the output of the span.
      - `error` string: This is the error message, if an error occurred inside the span.
      - `integration` string: This is the integration associated with the span.
      - `status` 'SUCCESS' | 'ERRORED': This represents the error status of the span.
      - `startTime` string, date-time: This is the time the span started.
      - `endTime` string, date-time: This is the time the span ended.
      - `parentUuid` string, uuid: This is the unique identifier of the span's parent span.
      - `metadata` object: This is any additional metadata associated with the span.
      - `metricCollection` string: This is the metric collection to be used for evaluating the span.
      - `type` string: This is a string that represents the type of span.
      - `retrievalContext` string[]: This is the retrieval context of your span, which is to be used for evaluation.
      - `context` string[]: This is the ideal retrieval context of your span, which is to be used for evaluation.
      - `expectedOutput` string: This is the expected output of your span, which is the ideal actual output and to be used for evaluation.
      - `toolsCalled` ToolCallData[]: This is the tools called by your span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `expectedTools` ToolCallData[]: This is the expected tools to be called by the span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `description` string: This is the description of the tool used in the span.
    - AgentSpan
      - `uuid` string: This is the unique identifier of the span.
      - `name` string: This is the name of the span.
      - `input` string: This is the input to the span.
      - `output` string: This is the output of the span.
      - `integration` string: This is the integration associated with the span.
      - `error` string: This is the error message, if an error occurred inside the span.
      - `status` 'SUCCESS' | 'ERRORED': This represents the error status of the span.
      - `startTime` string, date-time: This is the time the span started.
      - `endTime` string, date-time: This is the time the span ended.
      - `parentUuid` string, uuid: This is the unique identifier of the span's parent span.
      - `metadata` object: This is any additional metadata associated with the span.
      - `metricCollection` string: This is the metric collection to be used for evaluating the span.
      - `type` string: This is a string that represents the type of span.
      - `retrievalContext` string[]: This is the retrieval context of your span, which is to be used for evaluation.
      - `context` string[]: This is the ideal retrieval context of your span, which is to be used for evaluation.
      - `expectedOutput` string: This is the expected output of your span, which is the ideal actual output and to be used for evaluation.
      - `toolsCalled` ToolCallData[]: This is the tools called by your span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `expectedTools` ToolCallData[]: This is the expected tools to be called by the span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `availableTools` string[]: This is the list of names of available tools to be used in the span.
      - `agentHandoffs` string[]: This is the list of potential agent handoffs in the span.
    - BaseSpan
      - `uuid` string, required: This is the unique identifier of the span.
      - `name` string, required: This is the name of the span.
      - `input` string: This is the input to the span.
      - `output` string: This is the output of the span.
      - `error` string: This is the error message, if an error occurred inside the span.
      - `status` 'SUCCESS' | 'ERRORED': This represents the error status of the span.
      - `startTime` string, date-time, required: This is the time the span started.
      - `endTime` string, date-time, required: This is the time the span ended.
      - `parentUuid` string, uuid: This is the unique identifier of the span's parent span.
      - `metadata` object: This is any additional metadata associated with the span.
      - `metricCollection` string: This is the metric collection to be used for evaluating the span.
      - `type` string: This is a string that represents the type of span.
      - `retrievalContext` string[]: This is the retrieval context of your span, which is to be used for evaluation.
      - `context` string[]: This is the ideal retrieval context of your span, which is to be used for evaluation.
      - `expectedOutput` string: This is the expected output of your span, which is the ideal actual output and to be used for evaluation.
      - `toolsCalled` ToolCallData[]: This is the tools called by your span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `expectedTools` ToolCallData[]: This is the expected tools to be called by the span, which is to be used for evaluation.
        - `name` string, required: This is the name of the tool.
        - `description` string, required: This is the description of the tool.
        - `inputParameters` object: This is the input parameters that are passed to the tool.
        - `output` string: This is the output of the tool.
        - `reasoning` string: This is the reasoning your LLM provided for the tool call.
      - `integration` string: This is the integration associated with the span.
  - `deprecated` boolean, required: This is true if this endpoint is deprecated.

## Changes

> 54 revisions in range; 3 not diffed.

- **2026-05-07** `de53f2508682`: 6 info
  - added the optional property `data/oneOf[subschema #1: LLM Span]/integration` to the response with the `200` status
  - added the optional property `data/oneOf[subschema #1: LLM Span]/provider` to the response with the `200` status
  - added the optional property `data/oneOf[subschema #2: Retriever Span]/integration` to the response with the `200` status
  - added the optional property `data/oneOf[subschema #3: Tool Span]/integration` to the response with the `200` status
  - …2 more

[Operation history](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/changes/v1/spans/:spanUuid/get.md)

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
