Kernel Browser Computer Controls API
Control mouse, keyboard, and screen on the browser instance.
Control mouse, keyboard, and screen on the browser instance.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/kernel-browser-computer-controls-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Kernel API Keys Browser Computer Controls API
description: Developer tools and cloud infrastructure for AI agents to use web browsers
version: 0.1.0
servers:
- url: https://api.onkernel.com
description: API Server
security:
- bearerAuth: []
tags:
- name: Browser Computer Controls
description: Control mouse, keyboard, and screen on the browser instance.
paths:
/browsers/{id}/computer/click_mouse:
post:
summary: Simulate a mouse click action on the browser instance
operationId: clickMouse
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClickMouseRequest'
responses:
'200':
description: Mouse action performed
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.clickMouse('id', { x: 0, y: 0 });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.click_mouse(\n id=\"id\",\n x=0,\n y=0,\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.ClickMouse(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerClickMouseParams{\n\t\t\tX: 0,\n\t\t\tY: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/move_mouse:
post:
summary: Move the mouse cursor to the specified coordinates on the browser instance
operationId: moveMouse
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MoveMouseRequest'
responses:
'200':
description: Mouse cursor moved
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.moveMouse('id', { x: 0, y: 0 });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.move_mouse(\n id=\"id\",\n x=0,\n y=0,\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.MoveMouse(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerMoveMouseParams{\n\t\t\tX: 0,\n\t\t\tY: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/screenshot:
post:
summary: Capture a screenshot of the browser instance
operationId: takeScreenshot
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/ScreenshotRequest'
responses:
'200':
description: Screenshot image
content:
image/png:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.browsers.computer.captureScreenshot('id');\n\nconsole.log(response);\n\nconst content = await response.blob();\nconsole.log(content);"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.browsers.computer.capture_screenshot(\n id=\"id\",\n)\nprint(response)\ncontent = response.read()\nprint(content)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Browsers.Computer.CaptureScreenshot(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerCaptureScreenshotParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
/browsers/{id}/computer/type:
post:
summary: Type text on the browser instance
operationId: typeText
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TypeTextRequest'
responses:
'200':
description: Text typed successfully
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.typeText('id', { text: 'text' });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.type_text(\n id=\"id\",\n text=\"text\",\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.TypeText(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerTypeTextParams{\n\t\t\tText: \"text\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/press_key:
post:
summary: Press one or more keys on the host computer
operationId: pressKey
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PressKeyRequest'
responses:
'200':
description: Keys pressed successfully
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.pressKey('id', { keys: ['string'] });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.press_key(\n id=\"id\",\n keys=[\"string\"],\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.PressKey(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerPressKeyParams{\n\t\t\tKeys: []string{\"string\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/scroll:
post:
summary: Scroll the mouse wheel at a position on the host computer
operationId: scroll
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ScrollRequest'
responses:
'200':
description: Scroll performed
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.scroll('id', { x: 0, y: 0 });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.scroll(\n id=\"id\",\n x=0,\n y=0,\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.Scroll(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerScrollParams{\n\t\t\tX: 0,\n\t\t\tY: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/drag_mouse:
post:
summary: Drag the mouse along a path
operationId: dragMouse
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DragMouseRequest'
responses:
'200':
description: Drag performed
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.dragMouse('id', {\n path: [\n [0, 0],\n [0, 0],\n ],\n});"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.drag_mouse(\n id=\"id\",\n path=[[0, 0], [0, 0]],\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.DragMouse(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerDragMouseParams{\n\t\t\tPath: [][]int64{{0, 0}, {0, 0}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/cursor:
post:
summary: Set cursor visibility
operationId: setCursor
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SetCursorRequest'
responses:
'200':
description: Cursor visibility set
content:
application/json:
schema:
$ref: '#/components/schemas/OkResponse'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.browsers.computer.setCursorVisibility('id', { hidden: true });\n\nconsole.log(response.ok);"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.browsers.computer.set_cursor_visibility(\n id=\"id\",\n hidden=True,\n)\nprint(response.ok)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Browsers.Computer.SetCursorVisibility(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerSetCursorVisibilityParams{\n\t\t\tHidden: true,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Ok)\n}\n"
/browsers/{id}/computer/batch:
post:
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
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BatchComputerActionRequest'
responses:
'200':
description: All actions executed successfully
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.batch('id', { actions: [{ type: 'click_mouse' }] });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.batch(\n id=\"id\",\n actions=[{\n \"type\": \"click_mouse\"\n }],\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.Batch(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerBatchParams{\n\t\t\tActions: []kernel.BrowserComputerBatchParamsAction{{\n\t\t\t\tType: \"click_mouse\",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
/browsers/{id}/computer/get_mouse_position:
post:
summary: Get the current mouse cursor position on the browser instance
operationId: getMousePosition
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
responses:
'200':
description: Current mouse position
content:
application/json:
schema:
$ref: '#/components/schemas/MousePositionResponse'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.browsers.computer.getMousePosition('id');\n\nconsole.log(response.x);"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.browsers.computer.get_mouse_position(\n \"id\",\n)\nprint(response.x)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Browsers.Computer.GetMousePosition(context.TODO(), \"id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.X)\n}\n"
/browsers/{id}/computer/clipboard/read:
post:
summary: Read text from the clipboard on the browser instance
operationId: readClipboard
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
responses:
'200':
description: Clipboard content read successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ClipboardContent'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.browsers.computer.readClipboard('id');\n\nconsole.log(response.text);"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.browsers.computer.read_clipboard(\n \"id\",\n)\nprint(response.text)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Browsers.Computer.ReadClipboard(context.TODO(), \"id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Text)\n}\n"
/browsers/{id}/computer/clipboard/write:
post:
summary: Write text to the clipboard on the browser instance
operationId: writeClipboard
tags:
- Browser Computer Controls
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WriteClipboardRequest'
responses:
'200':
description: Text written to clipboard successfully
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.browsers.computer.writeClipboard('id', { text: 'text' });"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nclient.browsers.computer.write_clipboard(\n id=\"id\",\n text=\"text\",\n)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Browsers.Computer.WriteClipboard(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserComputerWriteClipboardParams{\n\t\t\tText: \"text\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
components:
schemas:
BatchComputerActionRequest:
type: object
description: A batch of computer actions to execute sequentially.
required:
- actions
properties:
actions:
type: array
description: Ordered list of actions to execute. Execution stops on the first error.
minItems: 1
maxItems: 100
items:
$ref: '#/components/schemas/ComputerAction'
additionalProperties: false
ClickMouseRequest:
type: object
required:
- x
- y
properties:
button:
type: string
description: Mouse button to interact with
enum:
- left
- right
- middle
- back
- forward
click_type:
type: string
description: Type of click action
enum:
- down
- up
- click
x:
type: integer
description: X coordinate of the click position
y:
type: integer
description: Y coordinate of the click position
hold_keys:
type: array
description: Modifier keys to hold during the click
items:
type: string
num_clicks:
type: integer
description: Number of times to repeat the click
default: 1
additionalProperties: false
ErrorDetail:
type: object
properties:
code:
type: string
description: Lower-level error code providing more specific detail
example: invalid_input
message:
type: string
description: Further detail about the error
example: Provided version string is not semver compliant
ClipboardContent:
type: object
required:
- text
properties:
text:
type: string
description: Current clipboard text content
additionalProperties: false
TypeTextRequest:
type: object
required:
- text
properties:
text:
type: string
description: Text to type on the browser instance
delay:
type: integer
description: Delay in milliseconds between keystrokes
minimum: 0
default: 0
additionalProperties: false
ScreenshotRequest:
type: object
properties:
region:
$ref: '#/components/schemas/ScreenshotRegion'
additionalProperties: false
ScrollRequest:
type: object
required:
- x
- y
properties:
x:
type: integer
description: X coordinate at which to perform the scroll
y:
type: integer
description: Y coordinate at which to perform the scroll
delta_x:
type: integer
description: Horizontal scroll amount in xdotool "wheel units." Positive scrolls right, negative scrolls left.
default: 0
delta_y:
type: integer
description: Vertical scroll amount in xdotool "wheel units." Positive scrolls down, negative scrolls up.
default: 0
hold_keys:
type: array
description: Modifier keys to hold during the scroll
items:
type: string
additionalProperties: false
ScreenshotRegion:
type: object
required:
- x
- y
- width
- height
properties:
x:
type: integer
description: X coordinate of the region's top-left corner
y:
type: integer
description: Y coordinate of the region's top-left corner
width:
type: integer
description: Width of the region in pixels
height:
type: integer
description: Height of the region in pixels
additionalProperties: false
PressKeyRequest:
type: object
required:
- keys
properties:
keys:
type: array
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
duration:
type: integer
description: Duration to hold the keys down in milliseconds. If omitted or 0, keys are tapped.
minimum: 0
default: 0
hold_keys:
type: array
description: Optional modifier keys to hold during the key press sequence.
items:
type: string
additionalProperties: false
OkResponse:
type: object
description: Generic OK response.
required:
- ok
properties:
ok:
type: boolean
description: Indicates success.
default: true
additionalProperties: false
Error:
type: object
required:
- code
- message
properties:
code:
type: string
description: Application-specific error code (machine-readable)
example: bad_request
message:
type: string
description: Human-readable error description for debugging
example: 'Missing required field: app_name'
details:
type: array
description: Additional error details (for multiple errors)
items:
$ref: '#/components/schemas/ErrorDetail'
inner_error:
$ref: '#/components/schemas/ErrorDetail'
MoveMouseRequest:
type: object
required:
- x
- y
properties:
x:
type: integer
description: X coordinate to move the cursor to
y:
type: integer
description: Y coordinate to move the cursor to
hold_keys:
type: array
description: Modifier keys to hold during the move
items:
type: string
smooth:
type: boolean
description: Use human-like Bezier curve path instead of instant mouse movement.
default: true
duration_ms:
type: integer
description: Target total duration in milliseconds for the mouse movement when smooth=true. Omit for automatic timing based on distance.
minimum: 50
maximum: 5000
additionalProperties: false
WriteClipboardRequest:
type: object
required:
- text
properties:
text:
type: string
description: Text to write to the system clipboard
additionalProperties: false
MousePositionResponse:
type: object
required:
- x
- y
properties:
x:
type: integer
description: X coordinate of the cursor
y:
type: integer
description: Y coordinate of the cursor
additionalProperties: false
ComputerAction:
type: object
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.
'
required:
- type
properties:
type:
type: string
description: The type of action to perform.
enum:
- click_mouse
- move_mouse
- type_text
- press_key
- scroll
- drag_mouse
- set_cursor
- sleep
click_mouse:
$ref: '#/components/schemas/ClickMouseRequest'
move_mouse:
$ref: '#/components/schemas/MoveMouseRequest'
type_text:
$ref: '#/components/schemas/TypeTextRequest'
press_key:
$ref: '#/components/schemas/PressKeyRequest'
scroll:
$ref: '#/components/schemas/ScrollRequest'
drag_mouse:
$ref: '#/components/schemas/DragMouseRequest'
set_cursor:
$ref: '#/components/schemas/SetCursorRequest'
sleep:
$ref: '#/components/schemas/SleepAction'
additionalProperties: false
SleepAction:
type: object
description: Pause execution for a specified duration.
required:
- duration_ms
properties:
duration_ms:
type: integer
description: Duration to sleep in milliseconds.
minimum: 0
maximum: 30000
additionalProperties: false
DragMouseRequest:
type: object
required:
- path
properties:
path:
type: array
description: Ordered list of [x, y] coordinate pairs to move through while dragging. Must contain at least 2 points.
minItems: 2
items:
type: array
minItems: 2
# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kernel/refs/heads/main/openapi/kernel-browser-computer-controls-api-openapi.yml