Launch Week 02 wrapped — explore all five launches

Retrieve Span

GEThttps://api.confident-ai.com/v1/spans/{spanUuid}

Retrieves a single, detailed span by its unique identifier.

GET/v1/spans/{spanUuid}
curl -X GET "https://api.confident-ai.com/v1/spans/{spanUuid}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "SPAN-ID",
    "uuid": "SPAN-UUID",
    "name": "Span Name",
    "startTime": "2025-01-15T10:30:00Z",
    "endTime": "2025-01-15T10:30:05Z",
    "traceUuid": "TRACE-UUID",
    "status": "SUCCESS",
    "type": "LLM",
    "provider": "OpenAI",
    "integration": "LangChain",
    "model": "gpt-4o",
    "promptAlias": "Prompt Alias"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • spanUuidstringRequired

    This is the span UUID you wish to retrieve.

Response

Successfully retrieved the detailed span.

  • successboolean

    This is true if the span was successfully retrieved.

  • dataobject | object | object | object | object

    The payload containing the detailed span data.

    Show 5 variantsHide 5 variants
    • LLM Spanobject

      Show 28 propertiesHide 28 properties
      • uuidstring

        This is the unique identifier of the span.

      • namestring

        This is the name of the span.

      • inputstring

        This is the input to the span.

      • outputstring

        This is the output of the span.

      • errorstring

        This is the error message, if an error occurred inside the span.

      • statusenum

        This represents the error status of the span.

        Show 2 enum valuesHide 2 enum values
        • SUCCESS
        • ERRORED
      • startTimestring

        This is the time the span started.

      • endTimestring

        This is the time the span ended.

      • parentUuidstring

        This is the unique identifier of the span's parent span.

      • metadataobject

        This is any additional metadata associated with the span.

      • metricCollectionstring

        This is the metric collection to be used for evaluating the span.

      • typestring

        This is a string that represents the type of span.

      • retrievalContextlist of strings

        This is the retrieval context of your span, which is to be used for evaluation.

      • contextlist of strings

        This is the ideal retrieval context of your span, which is to be used for evaluation.

      • expectedOutputstring

        This is the expected output of your span, which is the ideal actual output and to be used for evaluation.

      • toolsCalledlist of objects

        This is the tools called by your span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • expectedToolslist of objects

        This is the expected tools to be called by the span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • modelstring

        This is the LLM model used in the span.

      • providerstring

        This is the provider of the generation model used in the span.

      • integrationstring

        This is the integration associated with the span.

      • promptAliasstring

        This is the alias of your prompt which is stored on Confident AI.

      • promptCommitHashstring

        This is the hash of the current prompt being logged in the llm span.

      • promptLabelstring

        This is the label assigned to a specific version of prompt on the Confident AI platform.

      • promptVersionstring

        This is the version assigned to your prompt on Confident AI.

      • costPerInputTokennumber

        This is the cost per input token of the LLM model.

      • costPerOutputTokennumber

        This is the cost per output token of the LLM model.

      • inputTokenCountinteger

        This is the number of input tokens passed to the LLM model.

      • outputTokenCountinteger

        This is the number of output tokens generated by the LLM model.

    • OR
    • Retriever Spanobject

      Show 21 propertiesHide 21 properties
      • uuidstring

        This is the unique identifier of the span.

      • namestring

        This is the name of the span.

      • inputstring

        This is the input to the span.

      • outputstring

        This is the output of the span.

      • errorstring

        This is the error message, if an error occurred inside the span.

      • statusenum

        This represents the error status of the span.

        Show 2 enum valuesHide 2 enum values
        • SUCCESS
        • ERRORED
      • startTimestring

        This is the time the span started.

      • endTimestring

        This is the time the span ended.

      • parentUuidstring

        This is the unique identifier of the span's parent span.

      • metadataobject

        This is any additional metadata associated with the span.

      • metricCollectionstring

        This is the metric collection to be used for evaluating the span.

      • typestring

        This is a string that represents the type of span.

      • retrievalContextlist of strings

        This is the retrieval context of your span, which is to be used for evaluation.

      • contextlist of strings

        This is the ideal retrieval context of your span, which is to be used for evaluation.

      • expectedOutputstring

        This is the expected output of your span, which is the ideal actual output and to be used for evaluation.

      • integrationstring

        This is the integration associated with the span.

      • toolsCalledlist of objects

        This is the tools called by your span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • expectedToolslist of objects

        This is the expected tools to be called by the span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • embedderstring

        This is the embedder model used in the span.

      • topKinteger

        This is the top K chunks retrieved from your knowledge base.

      • chunkSizeinteger

        This is the chunk size of each retrieved context.

    • OR
    • Tool Spanobject

      Show 19 propertiesHide 19 properties
      • uuidstring

        This is the unique identifier of the span.

      • namestring

        This is the name of the span.

      • inputstring

        This is the input to the span.

      • outputstring

        This is the output of the span.

      • errorstring

        This is the error message, if an error occurred inside the span.

      • integrationstring

        This is the integration associated with the span.

      • statusenum

        This represents the error status of the span.

        Show 2 enum valuesHide 2 enum values
        • SUCCESS
        • ERRORED
      • startTimestring

        This is the time the span started.

      • endTimestring

        This is the time the span ended.

      • parentUuidstring

        This is the unique identifier of the span's parent span.

      • metadataobject

        This is any additional metadata associated with the span.

      • metricCollectionstring

        This is the metric collection to be used for evaluating the span.

      • typestring

        This is a string that represents the type of span.

      • retrievalContextlist of strings

        This is the retrieval context of your span, which is to be used for evaluation.

      • contextlist of strings

        This is the ideal retrieval context of your span, which is to be used for evaluation.

      • expectedOutputstring

        This is the expected output of your span, which is the ideal actual output and to be used for evaluation.

      • toolsCalledlist of objects

        This is the tools called by your span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • expectedToolslist of objects

        This is the expected tools to be called by the span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • descriptionstring

        This is the description of the tool used in the span.

    • OR
    • Agent Spanobject

      Show 20 propertiesHide 20 properties
      • uuidstring

        This is the unique identifier of the span.

      • namestring

        This is the name of the span.

      • inputstring

        This is the input to the span.

      • outputstring

        This is the output of the span.

      • integrationstring

        This is the integration associated with the span.

      • errorstring

        This is the error message, if an error occurred inside the span.

      • statusenum

        This represents the error status of the span.

        Show 2 enum valuesHide 2 enum values
        • SUCCESS
        • ERRORED
      • startTimestring

        This is the time the span started.

      • endTimestring

        This is the time the span ended.

      • parentUuidstring

        This is the unique identifier of the span's parent span.

      • metadataobject

        This is any additional metadata associated with the span.

      • metricCollectionstring

        This is the metric collection to be used for evaluating the span.

      • typestring

        This is a string that represents the type of span.

      • retrievalContextlist of strings

        This is the retrieval context of your span, which is to be used for evaluation.

      • contextlist of strings

        This is the ideal retrieval context of your span, which is to be used for evaluation.

      • expectedOutputstring

        This is the expected output of your span, which is the ideal actual output and to be used for evaluation.

      • toolsCalledlist of objects

        This is the tools called by your span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • expectedToolslist of objects

        This is the expected tools to be called by the span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • availableToolslist of strings

        This is the list of names of available tools to be used in the span.

      • agentHandoffslist of strings

        This is the list of potential agent handoffs in the span.

    • OR
    • Base Spanobject

      Show 18 propertiesHide 18 properties
      • uuidstring

        This is the unique identifier of the span.

      • namestring

        This is the name of the span.

      • inputstring

        This is the input to the span.

      • outputstring

        This is the output of the span.

      • errorstring

        This is the error message, if an error occurred inside the span.

      • statusenum

        This represents the error status of the span.

        Show 2 enum valuesHide 2 enum values
        • SUCCESS
        • ERRORED
      • startTimestring

        This is the time the span started.

      • endTimestring

        This is the time the span ended.

      • parentUuidstring

        This is the unique identifier of the span's parent span.

      • metadataobject

        This is any additional metadata associated with the span.

      • metricCollectionstring

        This is the metric collection to be used for evaluating the span.

      • typestring

        This is a string that represents the type of span.

      • retrievalContextlist of strings

        This is the retrieval context of your span, which is to be used for evaluation.

      • contextlist of strings

        This is the ideal retrieval context of your span, which is to be used for evaluation.

      • expectedOutputstring

        This is the expected output of your span, which is the ideal actual output and to be used for evaluation.

      • toolsCalledlist of objects

        This is the tools called by your span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • expectedToolslist of objects

        This is the expected tools to be called by the span, which is to be used for evaluation.

        Show 5 propertiesHide 5 properties
        • namestring

          This is the name of the tool.

        • descriptionstring

          This is the description of the tool.

        • inputParametersobject

          This is the input parameters that are passed to the tool.

        • outputstring

          This is the output of the tool.

        • reasoningstring

          This is the reasoning your LLM provided for the tool call.

      • integrationstring

        This is the integration associated with the span.

  • deprecatedboolean

    This is true if this endpoint is deprecated.

Built byConfident AI