Skip to content
Try out in chatDeveloper dashboardLogin

Execute multiple actions

POST/computers/{id}/batch

Execute a batch of actions in sequence, stopping on first error

Path ParametersExpand Collapse
id: string
Body ParametersJSONExpand Collapse
actions: optional array of ComputerAction { auto_detect_encoding, base64, button, 28 more }
auto_detect_encoding: optional boolean

For get_html_content

base64: optional boolean

For screenshot

button: optional string
debug: optional object { command, cwd, env, 3 more }
command: optional string
cwd: optional string
env: optional map[string]
max_output_length: optional number
stream: optional boolean
timeout_seconds: optional number
dx: optional number

For scrolling

dy: optional number
from_shm: optional boolean

FromShm (screenshot only) asks the guest to serve the screenshot from the capture loop's latest frame instead of a fresh full-grab. Desktop VM sessions only; falls back to full-grab if no frame is available.

height: optional number
include_context: optional boolean

Include page context in response

key: optional string

For key_down/key_up

keys: optional array of string
ms: optional number
path: optional array of object { x, y }
x: optional number
y: optional number
proxy_url: optional string
request_id: optional string

RequestId correlates streaming output to the originating request. Set at the top level of the action envelope, not on individual action types.

scale_factor: optional number
screenshot_after: optional boolean

ScreenshotAfter, when true, asks the engine to capture a screenshot immediately after the action and return its URL in the same response (act+observe in one round-trip). Feature-flagged, defaults off.

scroll_x: optional number

OpenAI CUA-spec aliases for the same data; used as fallbacks when dx/dy/x1/y1/x2/y2 are absent on the request.

scroll_y: optional number
settle_ms: optional number

SettleMs overrides, per-action, the settle time (ms) the guest waits between input sub-steps. Absent => guest process default. Lower = faster but riskier on slow-rendering targets.

tab_id: optional string

For tab management (browser sessions only)

text: optional string
type: optional string

click|double_click|right_click|drag|type|keypress|scroll|wait|screenshot|go_to_url|debug|get_html_content|set_viewport|list_tabs|new_tab|switch_tab|close_tab|key_down|key_up|mouse_down|mouse_up

url: optional string
width: optional number

For set_viewport

x: optional number
x1: optional number

For dragging/scrolling

x2: optional number

For dragging

y: optional number
y1: optional number
y2: optional number

Execute multiple actions

curl https://api.tzafon.ai/computers/$ID/batch \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TZAFON_API_KEY" \
    -d '{}'
{
  "foo": "bar"
}
Returns Examples
{
  "foo": "bar"
}