> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nasiko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Detail for one span: attributes, input/output content, and cost.



## OpenAPI

````yaml /api-reference/openapi.json get /api/observability/span/{trace_id}/{span_id}
openapi: 3.1.0
info:
  title: Nasiko API
  description: >-
    HTTP API for the Nasiko OpenRuntime: agents, coding harnesses, TokenOps,
    routing, MCP, and secrets. Spec is generated from annotated routes; some
    surfaces are documented on the hand-written pages alongside this file.
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
tags:
  - name: secrets
    description: Encrypted per-user agent secrets
  - name: catalog
    description: >-
      Agent catalog: registration, discovery, versions, per-agent secrets, and
      source import
  - name: agents
    description: >-
      Agent lifecycle: deployments, LLM routing config, update/rollback,
      upload-and-deploy
  - name: orchestrator
    description: >-
      A2A dispatch: routing-engine/ReAct orchestrator and direct agent chat,
      plus routing stats
  - name: users
    description: >-
      User management: CRUD, roles, credentials, accessible agents
      (superuser-only)
  - name: usage
    description: Per-user token usage and cost reporting
  - name: observability
    description: Sessions, traces, spans, agent logs, and FinOps reporting
  - name: llm-router
    description: LLM routing presets, provider/model catalog, and tier→model registry
  - name: mcp
    description: >-
      MCP gateway: agent-facing JSON-RPC tool calls, connector
      registration/upload/sharing, credentials & OAuth, and per-agent tool
      permissions
paths:
  /api/observability/span/{trace_id}/{span_id}:
    get:
      tags:
        - observability
      summary: 'Detail for one span: attributes, input/output content, and cost.'
      operationId: get_span_details
      parameters:
        - name: trace_id
          in: path
          description: W3C trace ID (hex)
          required: true
          schema:
            type: string
        - name: span_id
          in: path
          description: Span ID (hex)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Span detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpanDetailResponse'
        '404':
          description: Span not found in this trace
components:
  schemas:
    SpanDetailResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/SpanDetailData'
    SpanDetailData:
      type: object
      required:
        - span
      properties:
        span:
          $ref: '#/components/schemas/SpanDetail'
    SpanDetail:
      type: object
      required:
        - id
        - span_id
        - trace
        - name
        - span_kind
        - status_code
        - code
        - status_message
        - token_count_total
        - cache_read_tokens
        - cache_creation_tokens
        - cost_summary
        - input
        - output
        - attributes
        - events
        - span_annotations
        - span_annotation_summaries
        - document_retrieval_metrics
        - document_evaluations
        - project
      properties:
        attributes:
          type: object
        cache_creation_tokens:
          type: integer
          format: int64
          minimum: 0
        cache_read_tokens:
          type: integer
          format: int64
          minimum: 0
        code:
          type: string
        cost_summary:
          $ref: '#/components/schemas/FullCostSummary'
          description: >-
            Carries the prompt/completion split the Usage tab renders; the
            service

            already computed it and used to sum it away before serializing.
        document_evaluations:
          type: array
          items:
            type: object
        document_retrieval_metrics:
          type: array
          items:
            type: object
        end_time:
          type:
            - string
            - 'null'
        events:
          type: array
          items:
            type: object
        id:
          type: string
        input:
          $ref: '#/components/schemas/ContentField'
        latency_ms:
          type:
            - number
            - 'null'
          format: double
        model:
          type:
            - string
            - 'null'
        name:
          type: string
        output:
          $ref: '#/components/schemas/ContentField'
        parent_id:
          type:
            - string
            - 'null'
        project:
          $ref: '#/components/schemas/SpanProjectRef'
        provider:
          type:
            - string
            - 'null'
          description: >-
            GenAI provider and model, promoted out of the nested `attributes`
            blob

            so the detail pane reads one field instead of walking a semconv
            tree.
        span_annotation_summaries:
          type: array
          items:
            type: object
        span_annotations:
          type: array
          items:
            type: object
        span_id:
          type: string
        span_kind:
          type: string
        start_time:
          type:
            - string
            - 'null'
        status_code:
          type: string
        status_message:
          type: string
        token_count_total:
          type: integer
          format: int64
          minimum: 0
        trace:
          $ref: '#/components/schemas/SpanTraceRef'
    FullCostSummary:
      type: object
      required:
        - total
        - prompt
        - completion
        - cache_read
        - cache_creation
      properties:
        cache_creation:
          $ref: '#/components/schemas/CostWithTokens'
        cache_read:
          $ref: '#/components/schemas/CostWithTokens'
        completion:
          $ref: '#/components/schemas/CostWithTokens'
        prompt:
          $ref: '#/components/schemas/CostWithTokens'
        total:
          $ref: '#/components/schemas/CostWithTokens'
    ContentField:
      type: object
      required:
        - value
        - mime_type
      properties:
        mime_type:
          type: string
        parsed_value:
          type:
            - object
            - 'null'
        value:
          type: string
    SpanProjectRef:
      type: object
      required:
        - id
        - annotation_configs
      properties:
        annotation_configs:
          type: object
        id:
          type: string
    SpanTraceRef:
      type: object
      required:
        - id
        - trace_id
      properties:
        id:
          type: string
        trace_id:
          type: string
    CostWithTokens:
      type: object
      required:
        - cost
        - tokens
      properties:
        cost:
          type: number
          format: double
        tokens:
          type: integer
          format: int64
          minimum: 0

````