Kubi Docs
Kubi API

ErrorCode

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = string
type = string
Properties for Variant 1:
string · enum · maxLength: 63
Enum values:
INVALID_ARGUMENT
COORDINATE_OUT_OF_RANGE
BATCH_TOO_LONG
UNAUTHENTICATED
QUOTA_EXCEEDED
PAYMENT_REQUIRED
CREDIT_EXHAUSTED
SUBSCRIPTION_REQUIRED

ErrorDetails

Code-specific facts. Every key is optional and new keys may appear (U6).
field
​string · maxLength: 200

INVALID_ARGUMENT: the field at fault, as a path (actions[0].y).

​

INVALID_ARGUMENT, URL_NOT_ALLOWED: what is wrong.

​

UNAUTHENTICATED: why the credential failed.

needed
​Permission · enum · maxLength: 10

read: see screens, screenshots and history. control: act on the GUI. exec: run commands, read, write and list files. power: create, start, stop, restart (and, for API keys, delete). Same names as OAuth scopes.

Enum values:
read
control
exec
power
has
​Permission[] · maxItems: 4
Enum values:
read
control
exec
power
acted_since
​integer · int32 · min: 0 · max: 2147483647

STALE_OBSERVATION: input actions run since your screenshot.

restarted
​boolean

STALE_OBSERVATION: the screen restarted since your screenshot.

action_index
​integer · int32 · min: 0 · max: 19
x
​integer · int32 · min: 0 · max: 99999
y
​integer · int32 · min: 0 · max: 99999
space
​integer[] · minItems: 2 · maxItems: 2
screenshot_size
​integer[] · minItems: 2 · maxItems: 2
limit_bytes
​integer · int64 · min: 0 · max: 1099511627776
screens
​integer · int32 · min: 0 · max: 1000

QUOTA_EXCEEDED: screens the organization has, running or stopped.

screen_cap
​integer · int32 · min: 0 · max: 1000

QUOTA_EXCEEDED: the most screens the organization may have.

snapshots
​integer · int32 · min: 0 · max: 100

QUOTA_EXCEEDED on createSnapshot: the screen's snapshots.

snapshot_cap
​integer · int32 · min: 0 · max: 100

QUOTA_EXCEEDED on createSnapshot: the most a screen may keep.

min_usd
​integer · int32 · min: 0 · max: 100000

INVALID_ARGUMENT on a top-up: the smallest allowed now.

max_usd
​integer · int32 · min: 0 · max: 100000

INVALID_ARGUMENT on a top-up: the largest allowed now.

billing_url
​string · uri · maxLength: 300
pay_url
​string · uri · maxLength: 2000
stops_at
​string · date-time · maxLength: 40
balance_usd
​number · double · min: 0 · max: 1000000

ErrorBody

The same shape for every error on every route.
​ErrorCode · required

Stable machine code. The list can grow: treat an unknown code by its HTTP status.

  • INVALID_ARGUMENT (400): A field is missing, malformed or out of range (details.field, details.problem). Fix that field and resend.
  • COORDINATE_OUT_OF_RANGE (400): A point lies outside the coordinate space; it is rejected, never clamped. Use a point inside details.space.
  • BATCH_TOO_LONG (400): The batch would run past 28 s, inside the 30 s call limit. Split it into smaller batches.
  • UNAUTHENTICATED (401): The credential is missing, malformed, unknown, revoked or expired (details.reason). Send a valid key or token.
  • QUOTA_EXCEEDED (402): The organization is at its screen cap (details.screen_cap). Delete a screen, or a person asks support for a higher cap.
  • PAYMENT_REQUIRED (402): Payment failed. A person pays at details.pay_url.
  • CREDIT_EXHAUSTED (402): The usage credit that pays for disposable screens is used up (details.balance_usd). A person tops up at details.billing_url, or create a persistent screen.
  • SUBSCRIPTION_REQUIRED (402): Buying usage credit needs a paid persistent screen first. A person subscribes at details.billing_url.
  • PERMISSION_DENIED (403): The credential lacks details.needed, or is not bound to this screen. Use a credential that has it.
  • HUMAN_ONLY (403): Only a signed-in person (dashboard cookie) may call this. Ask a person to do it in the dashboard.
  • CSRF_REJECTED (403): A cookie request changed state without the dashboard's Origin. Send it from the dashboard, or use an API key.
  • ORGANIZATION_SUSPENDED (403): The organization is suspended. Stop and tell the user.
  • ACCOUNT_PENDING (403): The account is waiting for approval. Stop and tell the user.
  • SCREEN_NOT_FOUND (404): No such screen in your organization (the same answer for another organization's id). List screens for a valid id.
  • NOT_FOUND (404): No such operation, exec, key, app, export, template, snapshot or saved screenshot (saved ones go after 30 days). Check the id.
  • FILE_NOT_FOUND (404): Nothing at that path on the screen. List the folder with listFiles.
  • NO_CAPACITY (409): No free machine for a new screen right now; nothing was charged. Retry after retry_after.
  • STALE_OBSERVATION (409): Input ran (anyone's, a person's in the live view included) or the screen restarted since your screenshot (details.acted_since, details.restarted). Take a new screenshot first.
  • CONTROL_HELD (409): A person has control of this screen, so nothing ran. Control ends when they release it, or after 5 minutes with no input from them. Wait retry_after seconds, then take a new screenshot before acting.
  • SCREEN_NOT_RUNNING (409): The screen is stopped, starting or stopping. Start it, or wait on its operation.
  • OPERATION_IN_PROGRESS (409): Another power operation runs on this screen. Wait on it, then retry.
  • IDEMPOTENCY_KEY_IN_USE (409): A request with this key is still running. Retry the same request.
  • UNSUPPORTED_CAPABILITY (409): This screen cannot do that (for example a screenless box). Use a screen that can.
  • PAYLOAD_TOO_LARGE (413): The body or file is over details.limit_bytes. Send less, or move big files through exec.
  • UNSUPPORTED_MEDIA_TYPE (415): Wrong Content-Type. Send application/json (application/octet-stream for file uploads).
  • IDEMPOTENCY_KEY_REUSED (422): This key was used with a different body. Use a new key.
  • SECRET_BLOCKED (422): The input contains one of our API keys; nothing was typed or run. Remove the key and resend.
  • URL_NOT_ALLOWED (422): The URL is not public HTTPS: it resolves to a private or reserved address, or redirects. Use a public HTTPS URL.
  • RATE_LIMITED (429): Too many requests. Wait retry_after seconds.
  • INTERNAL (500): Our bug. Retry with the same Idempotency-Key.
  • SCREEN_UNAVAILABLE (503): The screen's host or desktop is not answering. Retry after retry_after.
  • OUTCOME_UNKNOWN (504): The work may or may not have happened. Look before acting; never resend blindly.
message
​string · maxLength: 1000 · required

One sentence for people and agents, ending with the fix. Do not parse it.

request_id
​string · maxLength: 40 · pattern: ^req_[0-9a-z]{20}$ · required

Quote it in support requests.

retryable
​boolean · required

True when the same request may succeed later. The SDK retries only these, never 504.

​required

not_applied: nothing changed, so the reply is never stored for the Idempotency-Key. unknown: look before acting.

​
docs_url
​string · uri · maxLength: 300
​ErrorDetails · maxProps: 30

Code-specific facts. Every key is optional and new keys may appear (U6).

Error

​ErrorBody · required

The same shape for every error on every route.

Permission

string · enum · maxLength: 10
Enum values:
read
control
exec
power

read: see screens, screenshots and history. control: act on the GUI. exec: run commands, read, write and list files. power: create, start, stop, restart (and, for API keys, delete). Same names as OAuth scopes.

Coordinate

integer · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

Point

​Coordinate[] · minItems: 2 · maxItems: 2

[x, y] in the coordinate space.

Space

​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

Region

​Coordinate[] · minItems: 4 · maxItems: 4

[x0, y0, x1, y1], top-left and bottom-right corners, in the coordinate space.

Labels

Your own key-value tags. Filter lists with `label=key:value`.
string · maxLength: 100

Size

width
​integer · int32 · min: 1 · max: 9999 · required
height
​integer · int32 · min: 1 · max: 9999 · required

MouseButton

string · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left

Modifiers

​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super

ImageFormat

string · enum · maxLength: 4
Enum values:
png
webp
jpeg

png by default (lossless, sharp text, no ICC chunk). webp at quality 80 is what the hosted MCP server sends, because it is smaller. jpeg is not recommended for UI text.

Default: png

ShotSize

string · maxLength: 9 · pattern: ^([0-9]{2,4}x[0-9]{2…

WIDTHxHEIGHT with the desktop's aspect ratio, or full (desktop size).

Default: 1280x720

MaxBytes

integer · int32 · min: 1000 · max: 40000000

Cap on the encoded image. webp and jpeg step quality 80, 70, 60, 50, then shrink; png only shrinks. The reply says the quality and size used. The hosted MCP sends 105000.

MaxUpscale

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = string
type = number
Properties for Variant 1:
Const value: fit

ScreenState

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = string
type = string
Properties for Variant 1:
string · enum · maxLength: 20
Enum values:
provisioning
starting
running
stopping
stopped
restarting
deleting
deleted

Health

Each capability on its own: a running VM can have a broken display. Host unreachable means unknown.
​required
​required
​required
​required
​

Resources

One size at launch. Resize comes later.
vcpu
​integer · int32 · min: 1 · max: 64 · required
memory_mb
​integer · int32 · min: 512 · max: 262144 · required
disk_gb
​integer · int32 · min: 1 · max: 4096 · required

ControlState

Whether a person has control of the screen.
held
​boolean · required

A person has control. Calls that look at or act on the screen get 409 CONTROL_HELD.

​
​

StateReason

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = string
type = string
Properties for Variant 1:
string · enum · maxLength: 200
Enum values:
stopped_by_user
stopped_by_billing
stopped_by_admin
stopped_by_credit

ScreenColor

string · enum · maxLength: 10
Enum values:
green
lime
teal
cyan
blue
indigo
violet
pink

The colour of the screen's cube, shown beside its name in the dashboard. Only for people telling screens apart; nothing else reads it. A new screen is green unless its create says otherwise.

ScreenKind

string · enum · maxLength: 12
Enum values:
persistent
disposable

persistent: on the monthly subscription, one price per screen, running or stopped; kept until deleted, and a delete can be undone for 7 days. disposable: paid from usage credit for the time it runs, charged per billing step as each step starts; it can carry an end time, is deleted 7 days after it stops unless started again, and a delete is final.

Default: persistent

ScreenSpend

What a disposable screen has cost so far.
running_s
​integer · int64 · min: 0 · max: 1099511627776 · required

Seconds it has run as a disposable screen.

charged_usd
​number · double · min: 0 · max: 1000000 · required

Credit charged for it so far, the step now running included.

since
​string · date-time · maxLength: 40 · required

When it became disposable (created or switched).

Screen

id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required
name
​string · maxLength: 63 · pattern: ^[a-z0-9][a-z0-9-]{0… · required
kind
​ScreenKind · enum · maxLength: 12 · required

persistent: on the monthly subscription, one price per screen, running or stopped; kept until deleted, and a delete can be undone for 7 days. disposable: paid from usage credit for the time it runs, charged per billing step as each step starts; it can carry an end time, is deleted 7 days after it stops unless started again, and a delete is final.

Enum values:
persistent
disposable
Default: persistent
​required

The cube's colour (ScreenColor). New colours may appear: show an unknown one as green.

​Labels · maxProps: 20 · required

Your own key-value tags. Filter lists with label=key:value.

​ScreenState · required

Power state. failed carries a state_reason. New values may appear.

​required
​required
image
​string · maxLength: 63 · required

The image it was created from. One desktop image at launch.

size
​string · maxLength: 20 · required

The size it was sold as (standard, the one size at launch); resources says what it has.

​Resources · required

One size at launch. Resize comes later.

region
​string · maxLength: 20 · required
​Health · required

Each capability on its own: a running VM can have a broken display. Host unreachable means unknown.

​ControlState · required

Whether a person has control of the screen.

incarnation
​integer · int32 · min: 0 · max: 2147483647 · required

Goes up when the machine restarts. Old screenshots and exec ids stop applying.

created_at
​string · date-time · maxLength: 40 · required
updated_at
​string · date-time · maxLength: 40 · required
​
​
​
​
​
​
viewers
​integer · int32 · min: 0 · max: 3

Live views open on the screen right now, at most 3.

​
​

ScreenCreate

name
​string · maxLength: 63 · pattern: ^[a-z0-9][a-z0-9-]{0…

Unique in the organization. Default: generated.

color
​ScreenColor · enum · maxLength: 10

The colour of the screen's cube, shown beside its name in the dashboard. Only for people telling screens apart; nothing else reads it. A new screen is green unless its create says otherwise.

Enum values:
green
lime
teal
cyan
blue
indigo
violet
pink
​Labels · maxProps: 20

Your own key-value tags. Filter lists with label=key:value.

kind
​ScreenKind · enum · maxLength: 12

persistent: on the monthly subscription, one price per screen, running or stopped; kept until deleted, and a delete can be undone for 7 days. disposable: paid from usage credit for the time it runs, charged per billing step as each step starts; it can carry an end time, is deleted 7 days after it stops unless started again, and a delete is final.

Enum values:
persistent
disposable
Default: persistent
template_id
​string · maxLength: 24 · pattern: ^tpl_[0-9a-z]{20}$

Start from this template. Default: blank.

size
​string · maxLength: 20 · pattern: ^[a-z0-9-]{1,20}$

Default: standard, the one size at launch. A size not sold in the screen's kind: INVALID_ARGUMENT.

ends_in_s
​integer · int32 · min: 300 · max: 2592000

Disposable only: delete it this many seconds after it is created. Default: no end time.

ScreenUpdate

Only the fields you send change. Labels replace the whole map.
name
​string · maxLength: 63 · pattern: ^[a-z0-9][a-z0-9-]{0…
color
​ScreenColor · enum · maxLength: 10

The colour of the screen's cube, shown beside its name in the dashboard. Only for people telling screens apart; nothing else reads it. A new screen is green unless its create says otherwise.

Enum values:
green
lime
teal
cyan
blue
indigo
violet
pink
​Labels · maxProps: 20

Your own key-value tags. Filter lists with label=key:value.

​

ScreenList

​Screen[] · maxItems: 100 · required
​required

OperationKind

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = string
type = string
Properties for Variant 1:
string · enum · maxLength: 30
Enum values:
screen.create
screen.start
screen.stop
screen.restart
screen.delete
screen.restore
screen.convert
template.create

ScreenConvert

The kind to switch to.
kind
​ScreenKind · enum · maxLength: 12 · required

persistent: on the monthly subscription, one price per screen, running or stopped; kept until deleted, and a delete can be undone for 7 days. disposable: paid from usage credit for the time it runs, charged per billing step as each step starts; it can carry an end time, is deleted 7 days after it stops unless started again, and a delete is final.

Enum values:
persistent
disposable
Default: persistent

Template

A saved screen to start new screens from: its disk, which holds what was installed on it, browser logins done by hand included. It never holds a secret: secrets are kept in the screen's memory and never written to its disk, so no template can carry one.
id
​string · maxLength: 24 · pattern: ^tpl_[0-9a-z]{20}$ · required
name
​string · maxLength: 63 · pattern: ^[a-z0-9][a-z0-9-]{0… · required
​required

saving: being made from its screen.

​Resources · required

One size at launch. Resize comes later.

with_memory
​boolean · required

true: a screen started from it comes back with the open windows it was saved with. false: it boots from the saved disk.

screens_started
​integer · int32 · min: 0 · max: 2147483647 · required

Screens started from it so far.

created_at
​string · date-time · maxLength: 40 · required
​
​
​

TemplateList

​Template[] · maxItems: 100 · required
​required

TemplateCreate

screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required
name
​string · maxLength: 63 · pattern: ^[a-z0-9][a-z0-9-]{0… · required

Unique among the organization's templates.

Snapshot

A saved state of a screen's disk to reset to. It holds the disk only: never the screen's memory and never a secret.
id
​string · maxLength: 25 · pattern: ^snap_[0-9a-z]{20}$ · required
screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required
​required
​required

creating: being taken.

​required
created_at
​string · date-time · maxLength: 40 · required

SnapshotList

​Snapshot[] · maxItems: 3 · required
​required

SnapshotCreate

name
​string · maxLength: 63

Optional label.

ResetRequest

​required

Operation

Work that takes longer than one call. Kept 30 days.
id
​string · maxLength: 23 · pattern: ^op_[0-9a-z]{20}$ · required
​OperationKind · required
​required

reconciling: the outcome is uncertain and we are checking the host. Not a failure; do not retry.

screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required
created_at
​string · date-time · maxLength: 40 · required
updated_at
​string · date-time · maxLength: 40 · required
​
​
​
​
​

OperationList

​Operation[] · maxItems: 100 · required
​required

Screenshot

screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$ · required

Names one capture. Pass it to runActions (and to getScreenshot with region) so coordinates use its size and stale views are refused.

​required
width
​integer · int32 · min: 1 · max: 9999 · required
height
​integer · int32 · min: 1 · max: 9999 · required
screen_width
​integer · int32 · min: 1 · max: 9999 · required
screen_height
​integer · int32 · min: 1 · max: 9999 · required
captured_at
​string · date-time · maxLength: 40 · required
input_seq
​integer · int64 · min: 0 · max: 9007199254740992 · required

Input actions run on this screen before the capture. runActions with this screenshot_id refuses to run if it has moved on.

size_bytes
​integer · int32 · min: 0 · max: 40000000 · required

Encoded image size before base64.

data
​string · maxLength: 40000000 · required

The image, base64. A copy is saved in the screen's history unless detailed history is off.

​
​
​
​
​WindowInfo[] · maxItems: 50

With windows=true: the open windows, topmost first, in this screenshot's pixels (a region's: the full screenshot's). Normal windows and dialogs only; at most 50.

WindowRef

A window by its title and app, read from the window manager.
title
​string · maxLength: 200 · required

The window's title, clipped to 200 characters. Read off the screen: history keeps the screenshot, never this text.

app
​string · maxLength: 100 · required

The app, from the window's class (for example chromium, org.gnome.TextEditor).

WindowInfo

One open window and its place, in the screenshot's pixels.
title
​string · maxLength: 200 · required

The window's title, clipped to 200 characters. Read off the screen: history keeps the screenshot, never this text.

app
​string · maxLength: 100 · required

The app, from the window's class (for example chromium, org.gnome.TextEditor).

x
​integer · int32 · min: -9999 · max: 9999 · required
y
​integer · int32 · min: -9999 · max: 9999 · required
width
​integer · int32 · min: 0 · max: 9999 · required
height
​integer · int32 · min: 0 · max: 9999 · required
active
​boolean · required

true for the window with the keyboard focus.

ScreenshotOptions

How the after-shot is taken.
size
​ShotSize · maxLength: 9 · pattern: ^([0-9]{2,4}x[0-9]{2…

WIDTHxHEIGHT with the desktop's aspect ratio, or full (desktop size).

Default: 1280x720
format
​ImageFormat · enum · maxLength: 4

png by default (lossless, sharp text, no ICC chunk). webp at quality 80 is what the hosted MCP server sends, because it is smaller. jpeg is not recommended for UI text.

Enum values:
png
webp
jpeg
Default: png
quality
​integer · int32 · min: 1 · max: 100

webp and jpeg only.

Default: 80
max_bytes
​MaxBytes · int32 · min: 1000 · max: 40000000

Cap on the encoded image. webp and jpeg step quality 80, 70, 60, 50, then shrink; png only shrinks. The reply says the quality and size used. The hosted MCP sends 105000.

cursor
​boolean

Draw the pointer.

Default: true
settle_quiet_ms
​integer · int32 · min: 0 · max: 2000

Wait until nothing changed for this long (pointer and caret-sized changes ignored).

Default: 300
settle_max_ms
​integer · int32 · min: 0 · max: 5000

Then capture anyway.

Default: 2000

ActionClick

Click. Without x and y: at the current pointer. count 2 = double, 3 = triple.
type
​string · const · maxLength: 20 · required
Const value: click
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left
count
​integer · int32 · min: 1 · max: 3
Default: 1
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super

ActionMove

Move the pointer (hover).
type
​string · const · maxLength: 20 · required
Const value: move
x
​Coordinate · int32 · min: 0 · max: 9999 · required

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999 · required

Pixels in the request's coordinate space, origin top left.

ActionMouseDown

Press a button and hold it. Released by mouse_up, or after 30 s.
type
​string · const · maxLength: 20 · required
Const value: mouse_down
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left

ActionMouseUp

Release a held button.
type
​string · const · maxLength: 20 · required
Const value: mouse_up
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left

ActionDrag

Press at the first point, move through the rest, release at the last.
type
​string · const · maxLength: 20 · required
Const value: drag
path
​Point[] · minItems: 2 · maxItems: 100 · required
button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super

ActionScroll

Scroll at x, y (or the pointer). Positive dy scrolls down, positive dx right. One notch is one wheel click; px converts at 100 px per notch, at least 1.
type
​string · const · maxLength: 20 · required
Const value: scroll
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

dx
​integer · int32 · min: -10000 · max: 10000
Default: 0
dy
​integer · int32 · min: -10000 · max: 10000
Default: 0
unit
​string · enum · maxLength: 5
Enum values:
notch
px
Default: notch
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super

ActionType

Type text as keystrokes, or paste it with `via: paste`. Up to 1,000 characters as keys and 100,000 by paste; the result reports characters delivered.
type
​string · const · maxLength: 20 · required
Const value: type
text
​string · minLength: 1 · maxLength: 100000 · required
enter
​boolean
Default: false
delay_ms
​integer · int32 · min: 0 · max: 100
Default: 12
via
​string · enum · maxLength: 5

keys: keystrokes, up to 1,000 characters. paste: put the text on the clipboard and paste it (ctrl+v, or ctrl+shift+v in a terminal), up to 100,000 characters, for long text and characters the keyboard lacks. It leaves the text on the clipboard.

Enum values:
keys
paste
Default: keys

ActionKey

Press a key or chord. hold_ms holds it down (Anthropic hold_key).
type
​string · const · maxLength: 20 · required
Const value: key
keys
​string · maxLength: 100 · pattern: ^[A-Za-z0-9_+ -]{1,1… · required

A key or +-joined chord: enter, ctrl+s, alt+tab. xdotool names (Return), OpenAI's upper-case names and Playwright names are accepted as aliases.

repeat
​integer · int32 · min: 1 · max: 100
Default: 1
hold_ms
​integer · int32 · min: 0 · max: 20000
Default: 0

ActionKeyDown

Press and hold. Released by key_up, or after 30 s.
type
​string · const · maxLength: 20 · required
Const value: key_down
keys
​string · maxLength: 100 · pattern: ^[A-Za-z0-9_+ -]{1,1… · required

A key or +-joined chord: enter, ctrl+s, alt+tab. xdotool names (Return), OpenAI's upper-case names and Playwright names are accepted as aliases.

ActionKeyUp

Release a held key.
type
​string · const · maxLength: 20 · required
Const value: key_up
keys
​string · maxLength: 100 · pattern: ^[A-Za-z0-9_+ -]{1,1… · required

A key or +-joined chord: enter, ctrl+s, alt+tab. xdotool names (Return), OpenAI's upper-case names and Playwright names are accepted as aliases.

ActionWait

A timed pause inside the batch.
type
​string · const · maxLength: 20 · required
Const value: wait
ms
​integer · int32 · min: 0 · max: 20000 · required

ActionSettle

Wait until the screen is quiet for quiet_ms (pointer and caret-sized changes ignored), at most max_ms. No image. Use it between a click and the next action, for example after opening a menu.
type
​string · const · maxLength: 20 · required
Const value: settle
quiet_ms
​integer · int32 · min: 0 · max: 2000
Default: 300
max_ms
​integer · int32 · min: 0 · max: 5000
Default: 2000

ActionCursorPosition

Report the pointer position in the coordinate space.
type
​string · const · maxLength: 20 · required
Const value: cursor_position

ActionScreenshot

Capture mid-batch (after settling). Counts toward 4 images per reply. The hosted MCP rejects it inside `act`.
type
​string · const · maxLength: 20 · required
Const value: screenshot
size
​ShotSize · maxLength: 9 · pattern: ^([0-9]{2,4}x[0-9]{2…

WIDTHxHEIGHT with the desktop's aspect ratio, or full (desktop size).

Default: 1280x720
format
​ImageFormat · enum · maxLength: 4

png by default (lossless, sharp text, no ICC chunk). webp at quality 80 is what the hosted MCP server sends, because it is smaller. jpeg is not recommended for UI text.

Enum values:
png
webp
jpeg
Default: png
quality
​integer · int32 · min: 1 · max: 100
Default: 80
max_bytes
​MaxBytes · int32 · min: 1000 · max: 40000000

Cap on the encoded image. webp and jpeg step quality 80, 70, 60, 50, then shrink; png only shrinks. The reply says the quality and size used. The hosted MCP sends 105000.

cursor
​boolean
Default: true

ActionZoom

Capture a region at full resolution. Later points stay in full-screenshot space (Anthropic's rule). The hosted MCP rejects it inside `act`.
type
​string · const · maxLength: 20 · required
Const value: zoom
region
​Coordinate[] · minItems: 4 · maxItems: 4 · required

[x0, y0, x1, y1], top-left and bottom-right corners, in the coordinate space.

format
​ImageFormat · enum · maxLength: 4

png by default (lossless, sharp text, no ICC chunk). webp at quality 80 is what the hosted MCP server sends, because it is smaller. jpeg is not recommended for UI text.

Enum values:
png
webp
jpeg
Default: png
quality
​integer · int32 · min: 1 · max: 100
Default: 80
max_bytes
​MaxBytes · int32 · min: 1000 · max: 40000000

Cap on the encoded image. webp and jpeg step quality 80, 70, 60, 50, then shrink; png only shrinks. The reply says the quality and size used. The hosted MCP sends 105000.

​MaxUpscale

Zoom only. fit (default): scale the region to the usual shot size, as Anthropic does. A number caps the upscale (2 = at most twice the desktop pixels), which costs fewer image tokens.

Default: fit

Action

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · type="click"
type = object · type="move" · requires: x, y
type = object · type="mouse_down"
type = object · type="mouse_up"
type = object · type="drag" · requires: path
type = object · type="scroll"
type = object · type="type" · requires: text
type = object · type="key" · requires: keys
type = object · type="key_down" · requires: keys
type = object · type="key_up" · requires: keys
type = object · type="wait" · requires: ms
type = object · type="settle"
type = object · type="cursor_position"
type = object · type="screenshot"
type = object · type="zoom" · requires: region
Properties for ActionClick:
Click. Without x and y: at the current pointer. count 2 = double, 3 = triple.
type
​string · const · maxLength: 20 · required
Const value: click
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left
count
​integer · int32 · min: 1 · max: 3
Default: 1
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super

ActionsRequest

​Action[] · minItems: 1 · maxItems: 20 · required

Run in order, 100 ms apart. Stops at the first failure; the rest are not_executed. The whole batch must fit in 28 s.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

ActionResult

Fields that do not apply are left out, never null.
index
​integer · int32 · min: 0 · max: 19 · required
type
​string · maxLength: 20 · required
​required
duration_ms
​integer · int32 · min: 0 · max: 30000 · required
​ErrorBody

The same shape for every error on every route.

cursor
​Coordinate[] · minItems: 2 · maxItems: 2

[x, y] in the coordinate space.

typed_chars
​integer · int32 · min: 0 · max: 100000
screen_changed
​boolean

Input actions only: whether anything visible changed after it (pointer and caret-sized changes ignored), watched until the next action, or up to 500 ms after the last one. false means no visible change, not failure: look again before repeating it.

​WindowRef

Input actions only: the topmost window under the point for a pointer action, else the active window that got the keys.

​Screenshot

ActionsResponse

​required

partial: an action failed; see results. The after-screenshot is still attached.

​ActionResult[] · maxItems: 20 · required
space
​integer[] · minItems: 2 · maxItems: 2 · required

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

​
screenshot_unchanged
​boolean

if_changed found no visible change.

​WindowRef

The window with the keyboard focus after the batch. Left out when there is none.

​WindowRef[] · maxItems: 20

Windows that opened during the batch, newest first. Left out when none did.

ExecCreate

command
​string · maxLength: 10000

Shell command, run with bash -lc as the desktop user. Send this or argv.

argv
​string[] · minItems: 1 · maxItems: 200

Program and arguments, no shell. Send this or command.

cwd
​string · maxLength: 1024
Default: /home/user
​object · maxProps: 50
stdin
​string · maxLength: 65536

Written to stdin, then closed.

timeout_s
​integer · int32 · min: 0 · max: 86400

0: no limit (dev servers, bots). At the limit we send TERM, then KILL after 10 s; status timed_out. Runs on after the call returns.

Default: 3600
wait_s
​integer · int32 · min: 0 · max: 25

Answer inline if done within this; else 202 and an id to poll.

Default: 25
max_bytes
​integer · int32 · min: 1 · max: 1048576

Bytes of output per stream in this reply.

Default: 65536
tail
​boolean

true: the last max_bytes after the offset (errors and exit lines). false: the first.

Default: false

Exec

id
​string · maxLength: 23 · pattern: ^ex_[0-9a-z]{20}$ · required
screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required
​required

lost: the screen restarted mid-run; the exit status is unknown. Never rerun blindly.

started_at
​string · date-time · maxLength: 40 · required
stdout
​string · maxLength: 1048576 · required

Output from stdout_from, up to max_bytes (head or tail). UTF-8, invalid bytes replaced.

stderr
​string · maxLength: 1048576 · required
stdout_bytes
​integer · int64 · min: 0 · max: 1099511627776 · required

Total bytes written so far. Use as the next stdout_from.

stderr_bytes
​integer · int64 · min: 0 · max: 1099511627776 · required
incarnation
​integer · int32 · min: 0 · max: 2147483647 · required
​
​
​
​
output_dropped
​boolean

Older output fell out of the 1 MiB per-stream buffer.

ExecKill

signal
​string · enum · maxLength: 4
Enum values:
TERM
INT
KILL
Default: TERM

FileWritten

path
​string · maxLength: 1024 · required
size_bytes
​integer · int32 · min: 0 · max: 67108864 · required
sha256
​string · maxLength: 64 · pattern: ^[0-9a-f]{64}$ · required

FileEntry

name
​string · maxLength: 255 · required
​required
size_bytes
​integer · int64 · min: 0 · max: 1125899906842624 · required
modified_at
​string · date-time · maxLength: 40 · required

Clipboard

text
​string · maxLength: 100000 · required

The clipboard's text; empty when it holds none or holds no text.

truncated
​boolean · required

true when the clipboard held more than 100,000 characters and only the first came back.

ClipboardSet

text
​string · maxLength: 100000 · required

Text to put on the clipboard; empty clears it.

FileList

Entries sorted by name. Folders first.
​FileEntry[] · maxItems: 1000 · required
​required

ViewerCreate

mode
​string · enum · maxLength: 12

interactive needs a person (cookie). Agents get view links.

Enum values:
view
interactive
Default: view

Viewer

`expires_at`: open the link by then. `session_expires_at`: the live session ends then (60 minutes for agent-minted links). Revoking the credential that minted it closes it.
url
​string · uri · maxLength: 500 · required

Open within 60 s. Single use. The ticket rides in the URL fragment.

​required
expires_at
​string · date-time · maxLength: 40 · required
session_expires_at
​string · date-time · maxLength: 40 · required

Actor

Who made the call: an API key, a connected app, a signed-in person, or Kubi itself.
​required
​
​
​

HistoryEntry

One call or event. Kept 30 days.
id
​string · maxLength: 30 · pattern: ^evt_[0-9a-z]{20}$ · required
at
​string · date-time · maxLength: 40 · required
kind
​string · maxLength: 40 · required

call for a call on the screen; otherwise an event such as screen.created, screen.deleted, key.created, key.revoked, app.connected, secret.set, proxy.set, control.taken or control.released. New kinds may appear.

​Actor · required

Who made the call: an API key, a connected app, a signed-in person, or Kubi itself.

summary
​string · maxLength: 300 · required

For example click (450, 280); type 15 chars; key enter.

result
​string · maxLength: 63 · required

ok or an error code.

screenshot_saved
​boolean · required

true when getSavedScreenshot returns the image. false when detailed history is off or the upload failed.

​
​
​
​
​
​
​
​

HistoryList

​HistoryEntry[] · maxItems: 100 · required
​required

Me

Who is calling and what it may do. Agents call this first.
​object · required
​object · required
​object · required
​object · required
​object · required
​object · required
​

Secret

Name and screens only: the value is never shown.
name
​string · maxLength: 64 · required
updated_at
​string · date-time · maxLength: 40 · required
​

SecretList

​Secret[] · maxItems: 100 · required
​required

ClickRequest

One `click` action plus the step options a batch takes.
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left
count
​integer · int32 · min: 1 · max: 3
Default: 1
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super
screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

TypeRequest

One `type` action plus the step options a batch takes.
text
​string · minLength: 1 · maxLength: 100000 · required
enter
​boolean
Default: false
delay_ms
​integer · int32 · min: 0 · max: 100
Default: 12
via
​string · enum · maxLength: 5

keys: keystrokes, up to 1,000 characters. paste: put the text on the clipboard and paste it (ctrl+v, or ctrl+shift+v in a terminal), up to 100,000 characters, for long text and characters the keyboard lacks. It leaves the text on the clipboard.

Enum values:
keys
paste
Default: keys
screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

PressRequest

One `key` action plus the step options a batch takes.
keys
​string · maxLength: 100 · pattern: ^[A-Za-z0-9_+ -]{1,1… · required

A key or +-joined chord: enter, ctrl+s, alt+tab. xdotool names (Return), OpenAI's upper-case names and Playwright names are accepted as aliases.

repeat
​integer · int32 · min: 1 · max: 100
Default: 1
hold_ms
​integer · int32 · min: 0 · max: 20000
Default: 0
screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

ScrollRequest

One `scroll` action plus the step options a batch takes.
x
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999

Pixels in the request's coordinate space, origin top left.

dx
​integer · int32 · min: -10000 · max: 10000
Default: 0
dy
​integer · int32 · min: -10000 · max: 10000
Default: 0
unit
​string · enum · maxLength: 5
Enum values:
notch
px
Default: notch
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super
screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

DragRequest

One `drag` action plus the step options a batch takes.
path
​Point[] · minItems: 2 · maxItems: 100 · required
button
​MouseButton · enum · maxLength: 10
Enum values:
left
right
middle
back
forward
Default: left
modifiers
​string[] · maxItems: 4 · unique

Keys held during the action.

Enum values:
shift
ctrl
alt
super
screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.

MoveRequest

One `move` action plus the step options a batch takes.
x
​Coordinate · int32 · min: 0 · max: 9999 · required

Pixels in the request's coordinate space, origin top left.

y
​Coordinate · int32 · min: 0 · max: 9999 · required

Pixels in the request's coordinate space, origin top left.

screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$

Optional precondition and coordinate default: the screenshot you acted on. If any input ran after it (a person's in the live view included) or the screen restarted, nothing runs: 409 STALE_OBSERVATION. The hosted MCP always sends it.

screenshot
​string · enum · maxLength: 10

after: attach the screen after the last action that ran, once it settles. if_changed: only if it changed visibly since screenshot_id (else screenshot_unchanged: true). none: no image. The hosted MCP sends after.

Enum values:
after
if_changed
none
Default: none
​ScreenshotOptions

How the after-shot is taken.

space
​integer[] · minItems: 2 · maxItems: 2

[width, height] that coordinates are expressed in. Default: the size of the screenshot named by screenshot_id, else [1280, 720] (the default screenshot). Both sent and different: 400 INVALID_ARGUMENT with both sizes in details. Gemini sends [1000, 1000]. Each axis is scaled to the desktop separately.