Skip to content
NorthstarPlatformPricingLogin

Execute multiple actions

computers.batch(strid, ComputerBatchParams**kwargs) -> ComputerBatchResponse
POST/computers/{id}/batch

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

ParametersExpand Collapse
id: str
actions: Optional[Iterable[ComputerActionParam]]
auto_detect_encoding: Optional[bool]

For get_html_content

base64: Optional[bool]

For screenshot

button: Optional[str]
debug: Optional[Debug]
command: Optional[str]
cwd: Optional[str]
env: Optional[Dict[str, str]]
max_output_length: Optional[int]
stream: Optional[bool]
timeout_seconds: Optional[int]
dx: Optional[float]

For scrolling

dy: Optional[float]
height: Optional[int]
include_context: Optional[bool]

Include page context in response

key: Optional[str]

For key_down/key_up

keys: Optional[List[str]]
ms: Optional[int]
path: Optional[List[Path]]
x: Optional[float]
y: Optional[float]
proxy_url: Optional[str]
request_id: Optional[str]

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[float]
scroll_x: Optional[float]

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[float]
tab_id: Optional[str]

For tab management (browser sessions only)

text: Optional[str]
type: Optional[str]

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[str]
width: Optional[int]

For set_viewport

x: Optional[float]
x1: Optional[float]

For dragging/scrolling

x2: Optional[float]

For dragging

y: Optional[float]
y1: Optional[float]
y2: Optional[float]
ReturnsExpand Collapse
Dict[str, object]

Execute multiple actions

import os
from tzafon import Lightcone

client = Lightcone(
    api_key=os.environ.get("TZAFON_API_KEY"),  # This is the default and can be omitted
)
response = client.computers.batch(
    id="id",
)
print(response)
{
  "foo": "bar"
}
Returns Examples
{
  "foo": "bar"
}