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

# Get a session

> Returns detailed session information including settings and stats. This feature is enabled for selected organizations only.



## OpenAPI

````yaml https://api.factory.ai/api/v0/openapi.json get /api/v0/sessions/{sessionId}
openapi: 3.0.1
info:
  title: Factory Public API
  description: >-
    Public API for Factory platform. Requires authentication via the
    `Authorization: Bearer` header.
  version: 0.1.0
servers:
  - url: https://api.factory.ai/
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v0/sessions/{sessionId}:
    get:
      tags:
        - Sessions
      summary: Get a session
      description: >-
        Returns detailed session information including settings and stats. This
        feature is enabled for selected organizations only.
      operationId: getSession
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            description: Session ID
        - name: computerId
          in: query
          required: false
          schema:
            type: string
            description: Computer ID to query directly
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSession200ResponseBody'
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSession401ResponseBody'
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSession403ResponseBody'
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSession404ResponseBody'
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSession500ResponseBody'
        '503':
          description: Response for status 503
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSession503ResponseBody'
components:
  schemas:
    GetSession200ResponseBody:
      type: object
      properties:
        sessionId:
          type: string
          description: Session ID
        title:
          type: string
          description: Session title
        status:
          type: string
          enum:
            - idle
            - pending
            - running
          description: Current session execution status
        messageCount:
          type: integer
          description: Number of messages in session
        createdAt:
          type: integer
          description: Creation timestamp (Unix ms)
        updatedAt:
          type: integer
          description: Last update timestamp (Unix ms)
        completedAt:
          type: integer
          description: Completion timestamp (Unix ms)
        computerId:
          type: string
          description: Connected computer ID
        sessionSettings:
          type: object
          properties:
            model:
              type: string
            reasoningEffort:
              type: string
              enum:
                - none
                - dynamic
                - 'off'
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
            interactionMode:
              type: string
              enum:
                - auto
                - spec
                - agi
            autonomyLevel:
              type: string
              enum:
                - 'off'
                - low
                - medium
                - high
            autonomyMode:
              type: string
              enum:
                - normal
                - spec
                - auto-low
                - auto-medium
                - auto-high
              description: 'Deprecated: use interactionMode + autonomyLevel instead.'
            specModeModel:
              type: string
            specModeReasoningEffort:
              type: string
              enum:
                - none
                - dynamic
                - 'off'
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
            providerLock:
              type: string
              enum:
                - anthropic
                - openai
                - generic-chat-completion-api
                - factory
                - google
                - xai
                - voyage
            providerLockTimestamp:
              type: string
            apiProviderLock:
              type: string
              enum:
                - bedrock
                - anthropic
                - vertex_anthropic
                - bedrock_anthropic
                - openai
                - azure_openai
                - google
                - xai
                - fireworks
                - baseten
                - snowflake
            assistantActiveTimeMs:
              type: number
            tokenUsage:
              type: object
              properties:
                inputTokens:
                  type: number
                outputTokens:
                  type: number
                cacheCreationTokens:
                  type: number
                cacheReadTokens:
                  type: number
                thinkingTokens:
                  type: number
                factoryCredits:
                  type: number
              required:
                - inputTokens
                - outputTokens
                - cacheCreationTokens
                - cacheReadTokens
                - thinkingTokens
              additionalProperties: false
            inclusiveTokenUsage:
              type: object
              properties:
                inputTokens:
                  type: number
                outputTokens:
                  type: number
                cacheCreationTokens:
                  type: number
                cacheReadTokens:
                  type: number
                thinkingTokens:
                  type: number
                factoryCredits:
                  type: number
              required:
                - inputTokens
                - outputTokens
                - cacheCreationTokens
                - cacheReadTokens
                - thinkingTokens
              additionalProperties: false
            childInclusiveTokenUsageBySessionId:
              type: object
              additionalProperties:
                type: object
                properties:
                  inputTokens:
                    type: number
                  outputTokens:
                    type: number
                  cacheCreationTokens:
                    type: number
                  cacheReadTokens:
                    type: number
                  thinkingTokens:
                    type: number
                  factoryCredits:
                    type: number
                required:
                  - inputTokens
                  - outputTokens
                  - cacheCreationTokens
                  - cacheReadTokens
                  - thinkingTokens
                additionalProperties: false
            archivedAt:
              type: string
            tags:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    minLength: 1
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - name
                additionalProperties: false
            enabledToolIds:
              type: array
              items:
                type: string
            disabledToolIds:
              type: array
              items:
                type: string
          additionalProperties: false
      required:
        - sessionId
        - status
        - messageCount
        - createdAt
        - updatedAt
      additionalProperties: false
    GetSession401ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    GetSession403ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    GetSession404ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    GetSession500ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    GetSession503ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Factory API key or JWT token for authentication

````