Implementation:Openai Openai python Response Computer Tool Call Param
| Knowledge Sources | |
|---|---|
| Domains | API_Types, Responses_API |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete parameter type for representing a computer use tool call in request payloads, provided by the openai-python SDK.
Description
ResponseComputerToolCallParam is a TypedDict mirroring the structure of ResponseComputerToolCall but designed for use in request payloads. It describes a tool call to a computer use tool with all the same action sub-types (ActionClick, ActionDoubleClick, ActionDrag, ActionKeypress, ActionMove, ActionScreenshot, ActionScroll, ActionType, ActionWait) and includes PendingSafetyCheck items. All primary fields are marked as Required. The Action type alias is a union of all nine action TypedDicts. This type is auto-generated from the OpenAI OpenAPI specification by Stainless.
Usage
Import ResponseComputerToolCallParam when constructing input items that include computer use tool call data to pass back to the Responses API.
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/responses/response_computer_tool_call_param.py
Signature
class ResponseComputerToolCallParam(TypedDict, total=False):
"""A tool call to a computer use tool."""
id: Required[str]
action: Required[Action]
call_id: Required[str]
pending_safety_checks: Required[Iterable[PendingSafetyCheck]]
status: Required[Literal["in_progress", "completed", "incomplete"]]
type: Required[Literal["computer_call"]]
Import
from openai.types.responses import ResponseComputerToolCallParam
I/O Contract
Fields
| Name | Type | Required | Description |
|---|---|---|---|
| id | str |
Yes | The unique ID of the computer call. |
| action | Action |
Yes | The action to perform (click, double_click, drag, keypress, move, screenshot, scroll, type, or wait). |
| call_id | str |
Yes | An identifier used when responding to the tool call with output. |
| pending_safety_checks | Iterable[PendingSafetyCheck] |
Yes | The pending safety checks for the computer call. |
| status | Literal["in_progress", "completed", "incomplete"] |
Yes | The status of the item. |
| type | Literal["computer_call"] |
Yes | The type of the computer call. Always "computer_call".
|
Action Sub-Types (TypedDicts)
| Type | Key Fields | Description |
|---|---|---|
| ActionClick | button, x, y, type |
A click action with button type and coordinates. |
| ActionDoubleClick | x, y, type |
A double-click action at given coordinates. |
| ActionDrag | path, type |
A drag action along a path of coordinate pairs. |
| ActionKeypress | keys, type |
A combination of key presses. |
| ActionMove | x, y, type |
A mouse move to given coordinates. |
| ActionScreenshot | type |
A screenshot capture request. |
| ActionScroll | scroll_x, scroll_y, x, y, type |
A scroll action at given coordinates. |
| ActionType | text, type |
A text typing action. |
| ActionWait | type |
A wait/pause action. |
Usage Examples
from openai.types.responses import ResponseComputerToolCallParam
tool_call: ResponseComputerToolCallParam = {
"id": "cu_abc123",
"action": {
"type": "click",
"button": "left",
"x": 100,
"y": 200,
},
"call_id": "call_xyz",
"pending_safety_checks": [],
"status": "completed",
"type": "computer_call",
}