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

# Send input events

> Send mouse and keyboard events to the remote desktop. Events are
executed in order on the host. Optional per-event `delay_ms` pauses
between events.

**Batching:** prefer a short ordered list when the next screens are
predictable. Cap is 100 events per call (MCP `send_actions` uses the
same endpoint with a tighter cap of 10 and an optional verification
observe in the same MCP turn).

**Rate limits:** each event counts individually against the per-plan
input quota — a 10-event batch consumes 10 tokens, not 1. Responses
use HTTP 429 with `Retry-After` when exceeded.

**Safety:** the owner kill switch and session end interrupt an
in-flight batch mid-sequence on the host (agent ≥ 0.2.21 with
`api_input_ack`). The HTTP call returns **410** with `executed` /
`aborted` counts — not 200.




## OpenAPI

````yaml /openapi.yaml post /v1/sessions/{sessionId}/input
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/{sessionId}/input:
    post:
      tags:
        - Input
      summary: Send input events
      description: |
        Send mouse and keyboard events to the remote desktop. Events are
        executed in order on the host. Optional per-event `delay_ms` pauses
        between events.

        **Batching:** prefer a short ordered list when the next screens are
        predictable. Cap is 100 events per call (MCP `send_actions` uses the
        same endpoint with a tighter cap of 10 and an optional verification
        observe in the same MCP turn).

        **Rate limits:** each event counts individually against the per-plan
        input quota — a 10-event batch consumes 10 tokens, not 1. Responses
        use HTTP 429 with `Retry-After` when exceeded.

        **Safety:** the owner kill switch and session end interrupt an
        in-flight batch mid-sequence on the host (agent ≥ 0.2.21 with
        `api_input_ack`). The HTTP call returns **410** with `executed` /
        `aborted` counts — not 200.
      operationId: sendInput
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - events
              properties:
                events:
                  type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    $ref: '#/components/schemas/InputEvent'
            example:
              events:
                - type: mouse_click
                  x: 400
                  'y': 300
                  button: left
                - type: type_text
                  text: Hello from the API
                  delay_ms: 50
                - type: key_press
                  key: Enter
      responses:
        '200':
          description: Input batch completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  executed:
                    type: integer
                  aborted:
                    type: integer
                  total:
                    type: integer
                  action_count:
                    type: integer
                    description: Session action counter after this call
        '400':
          description: Missing events or batch longer than 100
        '409':
          description: Input failed (consent blocked, unsupported platform, etc.)
        '410':
          description: |
            Session killed mid-batch (`aborted_by_owner`). Remaining events were
            not injected. Body includes `executed`, `aborted`, `aborted_at`,
            `kill_to_abort_ms`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: session_killed
                  code:
                    type: string
                    example: aborted_by_owner
                  executed:
                    type: integer
                  aborted:
                    type: integer
                  aborted_at:
                    type: integer
                    nullable: true
                  total:
                    type: integer
                  action_count:
                    type: integer
                  kill_to_abort_ms:
                    type: integer
                    description: ms from END_API_SESSION send to abort ACK
        '429':
          description: Input rate limit exceeded (counts each event in the batch)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: rate_limited
                  message:
                    type: string
                  retry_after_ms:
                    type: integer
        '502':
          description: Failed to deliver input to the host
components:
  schemas:
    InputEvent:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - mouse_move
            - mouse_click
            - mouse_scroll
            - key_press
            - key_down
            - key_up
            - type_text
        x:
          type: integer
          description: Absolute X coordinate (for mouse events)
        'y':
          type: integer
          description: Absolute Y coordinate (for mouse events)
        button:
          type: string
          enum:
            - left
            - right
            - middle
          description: Mouse button (for mouse_click)
        dx:
          type: integer
          description: Horizontal scroll delta (for mouse_scroll)
        dy:
          type: integer
          description: >-
            Vertical wheel notches for mouse_scroll (negative = down); mapped to
            MOUSEEVENTF_WHEEL
        key:
          type: string
          description: Key name (for key_press, key_down, key_up)
        text:
          type: string
          description: Text to type (for type_text)
        delay_ms:
          type: integer
          minimum: 0
          maximum: 5000
          description: |
            Optional pause after this event before the next (host-side). Useful
            when a UI needs settling time between clicks or keystrokes.
  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.