> ## 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.

# List sessions

> Returns a paginated list of sessions for the authenticated user. This feature is enabled for selected organizations only.



## OpenAPI

````yaml https://api.factory.ai/api/v0/openapi.json get /api/v0/sessions
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:
    get:
      tags:
        - Sessions
      summary: List sessions
      description: >-
        Returns a paginated list of sessions for the authenticated user. This
        feature is enabled for selected organizations only.
      operationId: listSessions
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: string
            default: '20'
            description: Maximum number of items to return (1-100)
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            description: Cursor for pagination
        - 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/ListSessions200ResponseBody'
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessions401ResponseBody'
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessions403ResponseBody'
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessions500ResponseBody'
components:
  schemas:
    ListSessions200ResponseBody:
      type: object
      properties:
        sessions:
          type: array
          items:
            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
        pagination:
          type: object
          properties:
            hasMore:
              type: boolean
              description: Whether there are more items after this page
            nextCursor:
              type: string
              nullable: true
              description: Cursor to use for the next page, null if no more pages
          required:
            - hasMore
            - nextCursor
          additionalProperties: false
      required:
        - sessions
        - pagination
      additionalProperties: false
    ListSessions401ResponseBody:
      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
    ListSessions403ResponseBody:
      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
    ListSessions500ResponseBody:
      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

````