Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Openai Openai python Response Computer Tool Call Screenshot Param

From Leeroopedia
Knowledge Sources
Domains API_Types, Responses_API
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete parameter type for providing a computer screenshot image with a computer use tool call output, provided by the openai-python SDK.

Description

ResponseComputerToolCallOutputScreenshotParam is a TypedDict representing a computer screenshot image sent as part of a computer use tool call output. It has a required type field fixed to "computer_screenshot", and optional file_id and image_url fields for providing the screenshot either as an uploaded file or via URL. This type is auto-generated from the OpenAI OpenAPI specification by Stainless.

Usage

Import ResponseComputerToolCallOutputScreenshotParam when constructing the output for a computer use tool call that includes a screenshot image.

Code Reference

Source Location

Signature

class ResponseComputerToolCallOutputScreenshotParam(TypedDict, total=False):
    """A computer screenshot image used with the computer use tool."""

    type: Required[Literal["computer_screenshot"]]
    file_id: str
    image_url: str

Import

from openai.types.responses import ResponseComputerToolCallOutputScreenshotParam

I/O Contract

Fields

Name Type Required Description
type Literal["computer_screenshot"] Yes Specifies the event type. Always "computer_screenshot".
file_id str No The identifier of an uploaded file that contains the screenshot.
image_url str No The URL of the screenshot image.

Usage Examples

from openai.types.responses import ResponseComputerToolCallOutputScreenshotParam

# Provide a screenshot via URL
screenshot: ResponseComputerToolCallOutputScreenshotParam = {
    "type": "computer_screenshot",
    "image_url": "https://example.com/screenshot.png",
}

# Or provide via uploaded file ID
screenshot_from_file: ResponseComputerToolCallOutputScreenshotParam = {
    "type": "computer_screenshot",
    "file_id": "file-abc123",
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment