Latitude · Schema

SpanDetail

CompanyArtificial IntelligenceObservabilityMonitoringPlatformAgents

Properties

Name Type Description
organizationId string Organization that owns this span.
projectId string Project this span belongs to.
traceId string Identifier of the trace this span belongs to.
spanId string Stable span identifier within the trace.
parentSpanId stringnull Identifier of the parent span. `null` for root spans.
sessionId stringnull Conversation/session identifier set by the SDK. `null` when absent.
userId stringnull End-user identifier set by the SDK. `null` when absent.
simulationId stringnull CUID of the simulation that produced this span. `null` when not a simulation.
apiKeyId stringnull Latitude API key used to ingest the span. `null` when ingested without an API key.
startTime string ISO-8601 timestamp at which the span started.
endTime string ISO-8601 timestamp at which the span ended.
name string Span name (e.g. the entry-point function or route).
serviceName string OpenTelemetry `service.name` of the emitting service.
kind string OpenTelemetry span kind.
statusCode string OpenTelemetry span status code.
statusMessage string OpenTelemetry status message. Empty when not set.
traceFlags number OpenTelemetry trace flags bitfield.
traceState string OpenTelemetry trace state (vendor-specific propagation). Empty when not set.
errorType stringnull Error class/type label when the span errored. `null` for successful spans.
tags array Free-form tags attached at ingest time.
operation string GenAI operation category (e.g. `"chat"`, `"embeddings"`, `"execute_tool"`, `"invoke_agent"`) or a custom string for non-GenAI spans.
provider stringnull LLM provider id. `null` for non-LLM spans.
model stringnull Model id as requested. `null` for non-LLM spans.
responseModel stringnull Model id reported by the provider's response. `null` for non-LLM spans.
tokensInput number Input tokens consumed by this span.
tokensOutput number Output tokens produced by this span.
tokensCacheRead number Tokens served from the provider's prompt cache.
tokensCacheCreate number Tokens written to the provider's prompt cache.
tokensReasoning number Reasoning tokens reported by the model.
costInputMicrocents number Cost of input tokens in microcents (100,000,000 per USD).
costOutputMicrocents number Cost of output tokens in microcents (100,000,000 per USD).
costTotalMicrocents number Total cost in microcents (100,000,000 per USD).
costIsEstimated boolean `true` when the cost was derived from public pricing tables instead of the provider's bill.
costSource string Where the cost came from. `provider_reported`: the instrumentation sent it. `user_reported`: you sent it with `latitude.cost.source` set to `user`. `estimated`: priced from public model pricing. `unpr
timeToFirstTokenNs number Nanoseconds from the start of the span to its first emitted token. `0` if not measured.
isStreaming boolean `true` when the span was produced by a streaming LLM call.
responseId stringnull Response identifier returned by the LLM. `null` when the provider didn't return one.
finishReasons array Per-choice finish reasons reported by the LLM provider.
scopeName string OpenTelemetry instrumentation scope name. Empty when not set.
scopeVersion string OpenTelemetry instrumentation scope version. Empty when not set.
retentionDays integer Per-span retention override in days. Omitted when the project default applies.
ingestedAt string ISO-8601 timestamp at which Latitude received this span.
metadata object Free-form metadata attached at ingest time.
systemInstructions object
inputMessages array Input messages sent into this LLM span, in OpenTelemetry GenAI format.
outputMessages array Output messages returned by this LLM span, in OpenTelemetry GenAI format.
toolDefinitions array Tool/function definitions made available to the LLM for this span.
toolCallId string Tool-call id this span answers. Empty when the span isn't an `execute_tool` span.
toolName string Name of the executed tool. Empty when the span isn't an `execute_tool` span.
toolInput string Stringified arguments passed to the tool. Empty when the span isn't an `execute_tool` span.
toolOutput string Stringified tool output. Empty when the span isn't an `execute_tool` span.
attrString object OpenTelemetry attributes with string values.
attrInt object OpenTelemetry attributes with integer values.
attrFloat object OpenTelemetry attributes with floating-point values.
attrBool object OpenTelemetry attributes with boolean values.
resourceString object OpenTelemetry resource attributes captured at ingest.
eventsJson string JSON-encoded OpenTelemetry events array. Empty when the span has no events.
linksJson string JSON-encoded OpenTelemetry span-links array. Empty when the span has no links.
View JSON Schema on GitHub

JSON Schema

latitude-so-span-detail-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/latitude-so/main/json-schema/latitude-so-span-detail-schema.json",
  "title": "SpanDetail",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-openapi.json#/components/schemas/SpanDetail",
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "description": "Organization that owns this span."
    },
    "projectId": {
      "type": "string",
      "description": "Project this span belongs to."
    },
    "traceId": {
      "type": "string",
      "description": "Identifier of the trace this span belongs to."
    },
    "spanId": {
      "type": "string",
      "description": "Stable span identifier within the trace."
    },
    "parentSpanId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Identifier of the parent span. `null` for root spans."
    },
    "sessionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Conversation/session identifier set by the SDK. `null` when absent."
    },
    "userId": {
      "type": [
        "string",
        "null"
      ],
      "description": "End-user identifier set by the SDK. `null` when absent."
    },
    "simulationId": {
      "type": [
        "string",
        "null"
      ],
      "description": "CUID of the simulation that produced this span. `null` when not a simulation."
    },
    "apiKeyId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Latitude API key used to ingest the span. `null` when ingested without an API key."
    },
    "startTime": {
      "type": "string",
      "description": "ISO-8601 timestamp at which the span started."
    },
    "endTime": {
      "type": "string",
      "description": "ISO-8601 timestamp at which the span ended."
    },
    "name": {
      "type": "string",
      "description": "Span name (e.g. the entry-point function or route)."
    },
    "serviceName": {
      "type": "string",
      "description": "OpenTelemetry `service.name` of the emitting service."
    },
    "kind": {
      "type": "string",
      "enum": [
        "unspecified",
        "internal",
        "server",
        "client",
        "producer",
        "consumer"
      ],
      "description": "OpenTelemetry span kind."
    },
    "statusCode": {
      "type": "string",
      "enum": [
        "unset",
        "ok",
        "error"
      ],
      "description": "OpenTelemetry span status code."
    },
    "statusMessage": {
      "type": "string",
      "description": "OpenTelemetry status message. Empty when not set."
    },
    "traceFlags": {
      "type": "number",
      "description": "OpenTelemetry trace flags bitfield."
    },
    "traceState": {
      "type": "string",
      "description": "OpenTelemetry trace state (vendor-specific propagation). Empty when not set."
    },
    "errorType": {
      "type": [
        "string",
        "null"
      ],
      "description": "Error class/type label when the span errored. `null` for successful spans."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Free-form tags attached at ingest time."
    },
    "operation": {
      "type": "string",
      "description": "GenAI operation category (e.g. `\"chat\"`, `\"embeddings\"`, `\"execute_tool\"`, `\"invoke_agent\"`) or a custom string for non-GenAI spans."
    },
    "provider": {
      "type": [
        "string",
        "null"
      ],
      "description": "LLM provider id. `null` for non-LLM spans."
    },
    "model": {
      "type": [
        "string",
        "null"
      ],
      "description": "Model id as requested. `null` for non-LLM spans."
    },
    "responseModel": {
      "type": [
        "string",
        "null"
      ],
      "description": "Model id reported by the provider's response. `null` for non-LLM spans."
    },
    "tokensInput": {
      "type": "number",
      "description": "Input tokens consumed by this span."
    },
    "tokensOutput": {
      "type": "number",
      "description": "Output tokens produced by this span."
    },
    "tokensCacheRead": {
      "type": "number",
      "description": "Tokens served from the provider's prompt cache."
    },
    "tokensCacheCreate": {
      "type": "number",
      "description": "Tokens written to the provider's prompt cache."
    },
    "tokensReasoning": {
      "type": "number",
      "description": "Reasoning tokens reported by the model."
    },
    "costInputMicrocents": {
      "type": "number",
      "description": "Cost of input tokens in microcents (100,000,000 per USD)."
    },
    "costOutputMicrocents": {
      "type": "number",
      "description": "Cost of output tokens in microcents (100,000,000 per USD)."
    },
    "costTotalMicrocents": {
      "type": "number",
      "description": "Total cost in microcents (100,000,000 per USD)."
    },
    "costIsEstimated": {
      "type": "boolean",
      "description": "`true` when the cost was derived from public pricing tables instead of the provider's bill."
    },
    "costSource": {
      "type": "string",
      "enum": [
        "provider_reported",
        "user_reported",
        "estimated",
        "unpriced",
        "no_tokens",
        "unknown"
      ],
      "description": "Where the cost came from. `provider_reported`: the instrumentation sent it. `user_reported`: you sent it with `latitude.cost.source` set to `user`. `estimated`: priced from public model pricing. `unpriced`: tokens were reported but no pricing matched, so the cost is 0 but not free. `no_tokens`: nothing to price. `unknown`: ingested before cost sources were tracked, so a 0 cannot be read as free."
    },
    "timeToFirstTokenNs": {
      "type": "number",
      "description": "Nanoseconds from the start of the span to its first emitted token. `0` if not measured."
    },
    "isStreaming": {
      "type": "boolean",
      "description": "`true` when the span was produced by a streaming LLM call."
    },
    "responseId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Response identifier returned by the LLM. `null` when the provider didn't return one."
    },
    "finishReasons": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Per-choice finish reasons reported by the LLM provider."
    },
    "scopeName": {
      "type": "string",
      "description": "OpenTelemetry instrumentation scope name. Empty when not set."
    },
    "scopeVersion": {
      "type": "string",
      "description": "OpenTelemetry instrumentation scope version. Empty when not set."
    },
    "retentionDays": {
      "type": "integer",
      "minimum": 0,
      "exclusiveMinimum": true,
      "description": "Per-span retention override in days. Omitted when the project default applies."
    },
    "ingestedAt": {
      "type": "string",
      "description": "ISO-8601 timestamp at which Latitude received this span."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form metadata attached at ingest time."
    },
    "systemInstructions": {
      "$ref": "#/$defs/GenAISpanSystem"
    },
    "inputMessages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GenAISpanMessage"
      },
      "description": "Input messages sent into this LLM span, in OpenTelemetry GenAI format."
    },
    "outputMessages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GenAISpanMessage"
      },
      "description": "Output messages returned by this LLM span, in OpenTelemetry GenAI format."
    },
    "toolDefinitions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ToolDefinition"
      },
      "description": "Tool/function definitions made available to the LLM for this span."
    },
    "toolCallId": {
      "type": "string",
      "description": "Tool-call id this span answers. Empty when the span isn't an `execute_tool` span."
    },
    "toolName": {
      "type": "string",
      "description": "Name of the executed tool. Empty when the span isn't an `execute_tool` span."
    },
    "toolInput": {
      "type": "string",
      "description": "Stringified arguments passed to the tool. Empty when the span isn't an `execute_tool` span."
    },
    "toolOutput": {
      "type": "string",
      "description": "Stringified tool output. Empty when the span isn't an `execute_tool` span."
    },
    "attrString": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "OpenTelemetry attributes with string values."
    },
    "attrInt": {
      "type": "object",
      "additionalProperties": {
        "type": "number"
      },
      "description": "OpenTelemetry attributes with integer values."
    },
    "attrFloat": {
      "type": "object",
      "additionalProperties": {
        "type": "number"
      },
      "description": "OpenTelemetry attributes with floating-point values."
    },
    "attrBool": {
      "type": "object",
      "additionalProperties": {
        "type": "boolean"
      },
      "description": "OpenTelemetry attributes with boolean values."
    },
    "resourceString": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "OpenTelemetry resource attributes captured at ingest."
    },
    "eventsJson": {
      "type": "string",
      "description": "JSON-encoded OpenTelemetry events array. Empty when the span has no events."
    },
    "linksJson": {
      "type": "string",
      "description": "JSON-encoded OpenTelemetry span-links array. Empty when the span has no links."
    }
  },
  "required": [
    "organizationId",
    "projectId",
    "traceId",
    "spanId",
    "parentSpanId",
    "sessionId",
    "userId",
    "simulationId",
    "apiKeyId",
    "startTime",
    "endTime",
    "name",
    "serviceName",
    "kind",
    "statusCode",
    "statusMessage",
    "traceFlags",
    "traceState",
    "errorType",
    "tags",
    "operation",
    "provider",
    "model",
    "responseModel",
    "tokensInput",
    "tokensOutput",
    "tokensCacheRead",
    "tokensCacheCreate",
    "tokensReasoning",
    "costInputMicrocents",
    "costOutputMicrocents",
    "costTotalMicrocents",
    "costIsEstimated",
    "costSource",
    "timeToFirstTokenNs",
    "isStreaming",
    "responseId",
    "finishReasons",
    "scopeName",
    "scopeVersion",
    "ingestedAt",
    "metadata",
    "systemInstructions",
    "inputMessages",
    "outputMessages",
    "toolDefinitions",
    "toolCallId",
    "toolName",
    "toolInput",
    "toolOutput",
    "attrString",
    "attrInt",
    "attrFloat",
    "attrBool",
    "resourceString",
    "eventsJson",
    "linksJson"
  ],
  "$defs": {
    "GenAISpanMessage": {
      "type": "object",
      "additionalProperties": {
        "nullable": true
      },
      "description": "Message in OpenTelemetry GenAI format (`role` + content parts + optional tool calls)."
    },
    "GenAISpanSystem": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {
          "nullable": true
        }
      },
      "description": "System instructions in OpenTelemetry GenAI format — an array of part objects."
    },
    "ToolDefinition": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Tool name as exposed to the LLM."
        },
        "description": {
          "type": "string",
          "description": "Tool description as exposed to the LLM."
        },
        "parameters": {
          "nullable": true,
          "description": "JSON Schema for the tool's parameters, as provided by the caller."
        }
      },
      "required": [
        "name",
        "description"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/latitude-so-span-detail"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.