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

# Get session by ID



## OpenAPI

````yaml /openapi.json GET /api/session/{id}
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
paths:
  /api/session/{id}:
    get:
      summary: Get session by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Session details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDetail'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: javascript
          label: Get a session
          source: |-
            import { Hyperbrowser } from '@hyperbrowser/sdk';

            const client = new Hyperbrowser({ apiKey: 'your-api-key' });

            await client.sessions.get('session-id');
        - lang: python
          label: Get a session
          source: |-
            from hyperbrowser import Hyperbrowser

            client = Hyperbrowser(api_key='your-api-key')

            client.sessions.get('session-id')
components:
  schemas:
    SessionDetail:
      allOf:
        - $ref: '#/components/schemas/Session'
        - type: object
          properties:
            sessionUrl:
              type: string
            liveUrl:
              type: string
            token:
              type: string
            wsEndpoint:
              type: string
            webdriverEndpoint:
              type: string
            computerActionEndpoint:
              type: string
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
    Session:
      type: object
      properties:
        id:
          type: string
          format: uuid
        teamId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - active
            - closed
            - error
        startTime:
          type: string
          format: timestamp-milliseconds
          nullable: true
        endTime:
          type: string
          format: timestamp-milliseconds
          nullable: true
        createdAt:
          type: string
          format: iso8601
        updatedAt:
          type: string
          format: iso8601
        launchState:
          $ref: '#/components/schemas/SessionLaunchState'
        creditsUsed:
          type: number
          nullable: true
    SessionLaunchState:
      type: object
      properties:
        useUltraStealth:
          type: boolean
        useStealth:
          type: boolean
        useProxy:
          type: boolean
        solveCaptchas:
          type: boolean
        solverType:
          type: string
          enum:
            - visual
          description: >-
            Optional CAPTCHA solver mode. Set to visual to use the visual
            reCAPTCHA solver.
        adblock:
          type: boolean
        trackers:
          type: boolean
        annoyances:
          type: boolean
        screen:
          $ref: '#/components/schemas/ScreenConfig'
        enableWebRecording:
          type: boolean
        enableVideoWebRecording:
          type: boolean
        enableLogCapture:
          type: boolean
        acceptCookies:
          type: boolean
        profile:
          $ref: '#/components/schemas/CreateSessionProfile'
        staticIpId:
          type: string
        saveDownloads:
          type: boolean
        enableWindowManager:
          type: boolean
        enableWindowManagerTaskbar:
          type: boolean
        viewOnlyLiveView:
          type: boolean
        disablePasswordManager:
          type: boolean
        enableAlwaysOpenPdfExternally:
          type: boolean
        disablePostQuantumKeyAgreement:
          type: boolean
      nullable: true
    ScreenConfig:
      type: object
      properties:
        width:
          type: number
          default: 1280
        height:
          type: number
          default: 720
    CreateSessionProfile:
      type: object
      properties:
        id:
          type: string
        persistChanges:
          type: boolean
        persistNetworkCache:
          type: boolean
          description: >-
            When persisting profile changes, also persist the browser's network
            cache (HTTP cache).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````