> ## Documentation Index
> Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-changelog-august-13.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute a batch of computer actions sequentially

> Send an array of computer actions to execute in order on the browser instance.
Execution stops on the first error. This reduces network latency compared to
sending individual action requests.




## OpenAPI

````yaml https://api.onkernel.com/spec.json post /browsers/{id}/computer/batch
openapi: 3.1.0
info:
  description: Developer tools and cloud infrastructure for AI agents to use web browsers
  title: Kernel API
  version: 0.1.0
servers:
  - description: API Server
    url: https://api.onkernel.com
security:
  - bearerAuth: []
tags:
  - description: Create and manage browser sessions.
    name: Browsers
  - description: Control mouse, keyboard, and screen on the browser instance.
    name: Browser Computer Controls
  - description: Execute Playwright code against the browser instance.
    name: Browser Playwright
  - description: Read, write, and manage files on the browser instance.
    name: Browser Filesystem
  - description: Execute and manage processes on the browser instance.
    name: Browser Processes
  - description: Record and manage browser session video replays.
    name: Browser Replays
  - description: Stream logs from the browser instance.
    name: Browser Logs
  - description: Stream live telemetry events from a browser session.
    name: Browser Telemetry
  - description: Create, list, retrieve, and delete browser profiles.
    name: Profiles
  - description: Create and manage proxy configurations for routing browser traffic.
    name: Proxies
  - description: Create, list, retrieve, and delete browser extensions.
    name: Extensions
  - description: Create and manage browser pools for acquiring and releasing browsers.
    name: Browser Pools
  - description: Inspect the identity and authorization context for the current request.
    name: Authentication
  - description: >-
      Create and manage auth connections for automated credential capture and
      login.
    name: Managed Auth
  - description: Create and manage credentials for authentication.
    name: Credentials
  - description: Configure external credential providers like 1Password.
    name: Credential Providers
  - description: List applications and versions.
    name: Apps
  - description: Create and manage app deployments and stream deployment events.
    name: Deployments
  - description: Invoke actions and stream or query invocation status and events.
    name: Invocations
  - description: Read and manage organization-level limits.
    name: Organization
  - description: |
      Create and manage projects for resource isolation within an organization.
      When projects are disabled for the organization, project operations return
      `404` with code `projects_disabled`.
    name: Projects
  - description: Create and manage API keys for organization and project-scoped access.
    name: API Keys
  - description: Read audit log records for the authenticated organization.
    name: Audit Logs
  - description: Resolve browser and proxy recommendations for bot-protected sites.
    name: Site Configs
paths:
  /browsers/{id}/computer/batch:
    post:
      tags:
        - Browser Computer Controls
      summary: Execute a batch of computer actions sequentially
      description: >
        Send an array of computer actions to execute in order on the browser
        instance.

        Execution stops on the first error. This reduces network latency
        compared to

        sending individual action requests.
      operationId: batchComputerAction
      parameters:
        - description: Browser session ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchComputerActionRequest'
        required: true
      responses:
        '200':
          description: All actions executed successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth: []
components:
  schemas:
    BatchComputerActionRequest:
      additionalProperties: false
      description: A batch of computer actions to execute sequentially.
      properties:
        actions:
          description: >-
            Ordered list of actions to execute. Execution stops on the first
            error.
          items:
            $ref: '#/components/schemas/ComputerAction'
          maxItems: 100
          minItems: 1
          type: array
      required:
        - actions
      type: object
    ComputerAction:
      additionalProperties: false
      description: >
        A single computer action to execute as part of a batch. The `type` field
        selects which

        action to perform, and the corresponding field contains the action
        parameters.

        Exactly one action field matching the type must be provided.
      properties:
        click_mouse:
          $ref: '#/components/schemas/ClickMouseRequest'
        drag_mouse:
          $ref: '#/components/schemas/DragMouseRequest'
        move_mouse:
          $ref: '#/components/schemas/MoveMouseRequest'
        press_key:
          $ref: '#/components/schemas/PressKeyRequest'
        scroll:
          $ref: '#/components/schemas/ScrollRequest'
        set_cursor:
          $ref: '#/components/schemas/SetCursorRequest'
        sleep:
          $ref: '#/components/schemas/SleepAction'
        type:
          description: The type of action to perform.
          enum:
            - click_mouse
            - move_mouse
            - type_text
            - press_key
            - scroll
            - drag_mouse
            - set_cursor
            - sleep
          type: string
        type_text:
          $ref: '#/components/schemas/TypeTextRequest'
      required:
        - type
      type: object
    Error:
      properties:
        code:
          description: Application-specific error code (machine-readable)
          example: bad_request
          type: string
        details:
          description: Additional error details (for multiple errors)
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
        inner_error:
          $ref: '#/components/schemas/ErrorDetail'
        message:
          description: Human-readable error description for debugging
          example: 'Missing required field: app_name'
          type: string
      required:
        - code
        - message
      type: object
    ClickMouseRequest:
      additionalProperties: false
      properties:
        button:
          description: Mouse button to interact with
          enum:
            - left
            - right
            - middle
            - back
            - forward
          type: string
        click_type:
          description: Type of click action
          enum:
            - down
            - up
            - click
          type: string
        hold_keys:
          description: Modifier keys to hold during the click
          items:
            type: string
          type: array
        num_clicks:
          default: 1
          description: Number of times to repeat the click
          type: integer
        'true':
          description: Y coordinate of the click position
          type: integer
        x:
          description: X coordinate of the click position
          type: integer
      required:
        - x
        - true
      type: object
    DragMouseRequest:
      additionalProperties: false
      properties:
        button:
          description: Mouse button to drag with
          enum:
            - left
            - middle
            - right
          type: string
        delay:
          default: 0
          description: >-
            Delay in milliseconds between button down and starting to move along
            the path.
          minimum: 0
          type: integer
        duration_ms:
          description: >-
            Target total duration in milliseconds for the entire drag movement
            when smooth=true. Omit for automatic timing based on total path
            length.
          maximum: 10000
          minimum: 50
          type: integer
        hold_keys:
          description: Modifier keys to hold during the drag
          items:
            type: string
          type: array
        path:
          description: >-
            Ordered list of [x, y] coordinate pairs to move through while
            dragging. Must contain at least 2 points.
          items:
            items:
              type: integer
            maxItems: 2
            minItems: 2
            type: array
          minItems: 2
          type: array
        smooth:
          default: true
          description: >-
            Use human-like Bezier curves between path waypoints instead of
            linear interpolation. When true, steps_per_segment and step_delay_ms
            are ignored.
          type: boolean
        step_delay_ms:
          default: 50
          description: >-
            Delay in milliseconds between relative steps while dragging (not the
            initial delay).
          minimum: 0
          type: integer
        steps_per_segment:
          default: 10
          description: Number of relative move steps per segment in the path. Minimum 1.
          minimum: 1
          type: integer
      required:
        - path
      type: object
    MoveMouseRequest:
      additionalProperties: false
      properties:
        duration_ms:
          description: >-
            Target total duration in milliseconds for the mouse movement when
            smooth=true. Omit for automatic timing based on distance.
          maximum: 5000
          minimum: 50
          type: integer
        hold_keys:
          description: Modifier keys to hold during the move
          items:
            type: string
          type: array
        smooth:
          default: true
          description: Use human-like Bezier curve path instead of instant mouse movement.
          type: boolean
        'true':
          description: Y coordinate to move the cursor to
          type: integer
        x:
          description: X coordinate to move the cursor to
          type: integer
      required:
        - x
        - true
      type: object
    PressKeyRequest:
      additionalProperties: false
      properties:
        duration:
          default: 0
          description: >-
            Duration to hold the keys down in milliseconds. If omitted or 0,
            keys are tapped.
          minimum: 0
          type: integer
        hold_keys:
          description: Optional modifier keys to hold during the key press sequence.
          items:
            type: string
          type: array
        keys:
          description: >
            List of key symbols to press. Each item should be a key symbol
            supported by xdotool

            (see X11 keysym definitions). Examples include "Return", "Shift",
            "Ctrl", "Alt", "F5".

            Items in this list could also be combinations, e.g. "Ctrl+t" or
            "Ctrl+Shift+Tab".
          items:
            type: string
          type: array
      required:
        - keys
      type: object
    ScrollRequest:
      additionalProperties: false
      properties:
        delta_x:
          default: 0
          description: >-
            Horizontal scroll amount in xdotool "wheel units." Positive scrolls
            right, negative scrolls left.
          type: integer
        delta_y:
          default: 0
          description: >-
            Vertical scroll amount in xdotool "wheel units." Positive scrolls
            down, negative scrolls up.
          type: integer
        hold_keys:
          description: Modifier keys to hold during the scroll
          items:
            type: string
          type: array
        'true':
          description: Y coordinate at which to perform the scroll
          type: integer
        x:
          description: X coordinate at which to perform the scroll
          type: integer
      required:
        - x
        - true
      type: object
    SetCursorRequest:
      additionalProperties: false
      properties:
        hidden:
          description: Whether the cursor should be hidden or visible
          type: boolean
      required:
        - hidden
      type: object
    SleepAction:
      additionalProperties: false
      description: Pause execution for a specified duration.
      properties:
        duration_ms:
          description: Duration to sleep in milliseconds.
          maximum: 30000
          minimum: 0
          type: integer
      required:
        - duration_ms
      type: object
    TypeTextRequest:
      additionalProperties: false
      properties:
        delay:
          default: 0
          description: Delay in milliseconds between keystrokes
          minimum: 0
          type: integer
        text:
          description: Text to type on the browser instance
          type: string
      required:
        - text
      type: object
    ErrorDetail:
      properties:
        code:
          description: Lower-level error code providing more specific detail
          example: invalid_input
          type: string
        message:
          description: Further detail about the error
          example: Provided version string is not semver compliant
          type: string
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request – invalid input
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Resource not found
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````