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

# Get session

> **Auth:** organization API key (`read` scope or higher) or a signed-in user.

Turns and steps for one session, with `detail_state` (`complete`, `partial`, `unavailable`, `live`).



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json get /api/v1/sessions/{session_id}
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for proxies, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/sessions/{session_id}:
    get:
      tags:
        - sessions
      summary: Get session
      description: >-
        **Auth:** organization API key (`read` scope or higher) or a signed-in
        user.


        Turns and steps for one session, with `detail_state` (`complete`,
        `partial`, `unavailable`, `live`).
      operationId: get_session_route_api_v1_sessions__session_id__get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SessionDetail:
      properties:
        summary:
          $ref: '#/components/schemas/SessionSummary'
        detail_state:
          $ref: '#/components/schemas/SessionDetailState'
        turns:
          items:
            $ref: '#/components/schemas/SessionTurn'
          type: array
          title: Turns
        warnings:
          items:
            type: string
          type: array
          title: Warnings
      type: object
      required:
        - summary
        - detail_state
      title: SessionDetail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionSummary:
      properties:
        session_id:
          type: string
          title: Session Id
        type:
          type: string
          title: Type
          default: session
        status:
          $ref: '#/components/schemas/SessionStatus'
        proxy:
          $ref: '#/components/schemas/SessionProxy'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        calls:
          type: integer
          title: Calls
        turns:
          type: integer
          title: Turns
        steps:
          type: integer
          title: Steps
        policy_blocks:
          type: integer
          title: Policy Blocks
        tokens:
          $ref: '#/components/schemas/SessionTokenUsage'
        cost:
          anyOf:
            - $ref: '#/components/schemas/SessionCost'
            - type: 'null'
        started_at:
          type: string
          format: date-time
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        last_activity_at:
          type: string
          format: date-time
          title: Last Activity At
        terminal_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Terminal Reason
      type: object
      required:
        - session_id
        - status
        - proxy
        - calls
        - turns
        - steps
        - policy_blocks
        - tokens
        - started_at
        - last_activity_at
      title: SessionSummary
    SessionDetailState:
      type: string
      enum:
        - complete
        - partial
        - unavailable
        - live
      title: SessionDetailState
    SessionTurn:
      properties:
        id:
          type: string
          title: Id
        index:
          type: integer
          title: Index
        status:
          $ref: '#/components/schemas/SessionStatus'
        started_at:
          type: string
          format: date-time
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        steps:
          items:
            $ref: '#/components/schemas/SessionStep'
          type: array
          title: Steps
      type: object
      required:
        - id
        - index
        - status
        - started_at
      title: SessionTurn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SessionStatus:
      type: string
      enum:
        - allowed
        - blocked
        - escalated
        - error
        - running
        - incomplete
      title: SessionStatus
    SessionProxy:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: SessionProxy
    SessionTokenUsage:
      properties:
        input:
          type: integer
          title: Input
          default: 0
        output:
          type: integer
          title: Output
          default: 0
        total:
          type: integer
          title: Total
          default: 0
      type: object
      title: SessionTokenUsage
    SessionCost:
      properties:
        amount:
          type: string
          title: Amount
        currency:
          type: string
          title: Currency
      type: object
      required:
        - amount
        - currency
      title: SessionCost
    SessionStep:
      properties:
        id:
          type: string
          title: Id
        kind:
          $ref: '#/components/schemas/SessionStepKind'
        name:
          type: string
          title: Name
        status:
          $ref: '#/components/schemas/SessionStatus'
        started_at:
          type: string
          format: date-time
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
      type: object
      required:
        - id
        - kind
        - name
        - status
        - started_at
      title: SessionStep
    SessionStepKind:
      type: string
      enum:
        - received
        - intent
        - policy
        - llm
        - tool
        - retrieval
        - embedding
        - guardrail
        - finished
        - escalation
        - other
      title: SessionStepKind
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Proxy keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````