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

# Create a session

> Start a new desktop session on a rig. The rig must be online
and have API access enabled by the owner.




## OpenAPI

````yaml /openapi.yaml post /v1/sessions
openapi: 3.1.0
info:
  title: Glasswarp Platform API
  version: 1.0.0
  description: >
    Real-time visual access and native input control on Windows machines.

    See any screen. Control any PC. One API.


    ## Authentication


    Most `/v1/*` endpoints require a bearer token:


    ```

    Authorization: Bearer gw_live_sk_...

    ```


    Exception: `GET /v1/agent/latest` is public (host auto-update).


    API keys are created in the [Console](/console/keys).

    Keys are scoped to your account and can access any rig with API access
    enabled.


    ## Base URL


    `https://signal.glasswarp.com`
  contact:
    name: Glasswarp
    url: https://glasswarp.com
  license:
    name: Proprietary
servers:
  - url: https://signal.glasswarp.com
    description: Production
security:
  - apiKey: []
paths:
  /v1/sessions:
    post:
      tags:
        - Sessions
      summary: Create a session
      description: |
        Start a new desktop session on a rig. The rig must be online
        and have API access enabled by the owner.
      operationId: createSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - rig_id
              properties:
                rig_id:
                  type: string
                mode:
                  type: string
                  enum:
                    - desktop
                    - app
                  default: desktop
                idle_timeout_seconds:
                  type: integer
                  minimum: 60
                  maximum: 3600
                  default: 900
                  description: >
                    Seconds with no screenshot, observe, or input before the

                    session is ended automatically
                    (`ended_reason=idle_timeout`).

                    Longer timeouts keep the concurrency slot and continue

                    wall-clock billing. Default 900 (15 minutes).
      responses:
        '201':
          description: Session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '400':
          description: Invalid request
        '402':
          description: >
            Plan limit (minutes exhausted, concurrent_limit, payment_failed,
            etc.).

            Concurrent limit is per-account tier (Free 1 / Builder 3 / Growth
            10).
        '403':
          description: API access not enabled on this rig
        '409':
          description: |
            Rig already has an active session (per-rig mutex — one session per
            machine regardless of plan tier), or rig offline / not enabled.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    example: rig_busy
                  active_session_id:
                    type: string
components:
  schemas:
    Session:
      type: object
      properties:
        session_id:
          type: string
          example: s_xyz789
        rig_id:
          type: string
        mode:
          type: string
          enum:
            - desktop
            - app
        status:
          type: string
          enum:
            - active
            - ended
            - failed
        started_at:
          type: string
          format: date-time
        action_count:
          type: integer
        idle_timeout_seconds:
          type: integer
          description: Inactivity seconds before automatic idle end (60–3600).
        capture_mode:
          type: string
          enum:
            - dxgi
            - gdi
            - gdi_fallback
            - unknown
          description: >-
            Host API capture path (updates mid-session on DXGI loss → GDI
            fallback)
          example: dxgi
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key in the format `gw_(live|test)_sk_<hex>`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.