Claude can interact with computer environments through the computer use tool, which provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
The computer use tool is an Anthropic-defined client toolset: one {"type": "computer_toolset_20260801"} entry in tools gives Claude 17 member tools such as screenshot, left_click, type, and zoom, and your application runs every call in an environment you control. It isn't currently available in Claude Managed Agents. Claude's calls are tool_use blocks whose name is the member and which carry "toolset_name": "computer", often several per turn (a batch action).
For tasks that stay inside webpages, the browser use tool is the closer fit: its member tools read and act on the page itself, and it doesn't need a full desktop environment.
Computer use has unique risks distinct from standard API features. These risks are heightened when interacting with the internet.
In some circumstances, Claude will follow commands found in content even when they conflict with your instructions. For example, instructions on webpages or contained in images might override your instructions or cause Claude to make mistakes. Take precautions to isolate Claude from sensitive data and actions to avoid risks related to prompt injection.
Anthropic has trained the model to resist these prompt injections and has added an extra layer of defense. If you use the computer use tools, classifiers will automatically run on your prompts to flag potential instances of prompt injections. When these classifiers identify potential prompt injections in screenshots, they will automatically steer the model to ask for user confirmation before proceeding with the next action. This extra protection won't be ideal for every use case (for example, use cases without a human in the loop), so if you'd like to opt out and turn it off, contact support.
These precautions remain important even with the classifier defense layer in place.
Inform end users of relevant risks and obtain their consent prior to enabling computer use in your own products.
Add the computer use toolset to the tools array of a Messages API request as {"type": "computer_toolset_20260801"}. The request needs no beta header. This example also declares the text editor tool and bash tool, which Claude typically uses alongside computer use:
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-5",
max_tokens=1024,
tools=[
{"type": "computer_toolset_20260801"},
{"type": "text_editor_20250728", "name": "str_replace_based_edit_tool"},
{"type": "bash_20250124", "name": "bash"},
],
messages=[{"role": "user", "content": "Save a picture of a cat to my desktop."}],
)
print(response)When Claude acts on the desktop, the response has a stop_reason of tool_use and contains one or more member tool_use blocks, each naming a member tool and carrying "toolset_name": "computer". Partway through this task, after Claude has seen a screenshot of the desktop, a response might look like this:
{
"id": "msg_01UZ3bXcQH8mTqNhVfL9eK2p",
"type": "message",
"role": "assistant",
"model": "claude-opus-5",
"content": [
{
"type": "text",
"text": "I'll open the web browser to find a picture of a cat."
},
{
"type": "tool_use",
"id": "toolu_01WkoTUvSHDzTBu2xnGk8Ep8",
"name": "left_click",
"toolset_name": "computer",
"input": { "coordinate": [512, 742] }
},
{
"type": "tool_use",
"id": "toolu_017nJn3RgSCkTMwuZDb4uUov",
"name": "screenshot",
"toolset_name": "computer",
"input": {}
}
],
"stop_reason": "tool_use",
"stop_sequence": null
}Your application runs each call in order in your own environment, returns one tool_result block per tool_use block, and calls the API again; How computer use works describes that loop, and the rest of this page shows how to implement it.
Provide Claude with the computer use tool and a user prompt
tools array of your API request.Claude responds with member tool calls
tool_use blocks, such as screenshot, left_click, or type, each carrying "toolset_name": "computer". A response with several of these blocks is a batch action.stop_reason of tool_use, signaling a tool use request.Run the calls in order and return results
tool_use block in the response, in order. For each one, dispatch on the member name together with toolset_name, and perform that action with the block's input on your container or virtual machine.user message that contains one tool_result block per tool_use block, matched by tool_use_id and each echoing "toolset_name": "computer". Return an image for screenshot and zoom; a short text such as OK is enough for the other actions.is_error: true for that block and answer the rest of the batch as described in Batch actions.Claude continues until the task is complete
tool_use stop_reason and you should return to step 3.The repetition of steps 3 and 4 without user input is referred to as the "agent loop" (that is, Claude responding with a tool use request and your application responding to Claude with the results of evaluating that request).
Claude can plan a short sequence of actions, such as click, type, and then take a screenshot, and return them together in one response. This is called a batch action; it uses the same response shape as parallel tool use with one difference: you run the blocks in order rather than concurrently.
A response with a three-action batch looks like this:
{
"role": "assistant",
"content": [
{
"type": "tool_use",
"id": "toolu_01HqCF3nJ4Vzr8sTkPZ2wxYA",
"name": "left_click",
"toolset_name": "computer",
"input": { "coordinate": [640, 60] }
},
{
"type": "tool_use",
"id": "toolu_01Ppr3sZ3TnE9m6VUu4RyH2K",
"name": "type",
"toolset_name": "computer",
"input": { "text": "pictures of cats" }
},
{
"type": "tool_use",
"id": "toolu_01Xf5W1sD8Q9aBcJ7kLmN2pQ",
"name": "screenshot",
"toolset_name": "computer",
"input": {}
}
]
}Return one tool_result block for each tool_use block, matched by tool_use_id, all in the next user message. Every result for a member tool must carry "toolset_name": "computer"; a result that omits it, or that names a different toolset than its tool_use block, is rejected. Only screenshot and zoom results need an image; for the other members, a short text acknowledgment such as OK is enough (cursor_position returns the coordinates as text):
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_01HqCF3nJ4Vzr8sTkPZ2wxYA",
"toolset_name": "computer",
"content": [{ "type": "text", "text": "OK" }]
},
{
"type": "tool_result",
"tool_use_id": "toolu_01Ppr3sZ3TnE9m6VUu4RyH2K",
"toolset_name": "computer",
"content": [{ "type": "text", "text": "OK" }]
},
{
"type": "tool_result",
"tool_use_id": "toolu_01Xf5W1sD8Q9aBcJ7kLmN2pQ",
"toolset_name": "computer",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/png",
"data": "iVBORw0KGgo..."
}
}
]
}
]
}Run blocks in order and stop at the first failure. Later actions in a batch usually depend on earlier ones: the type in this example enters text into whatever the preceding click focused. Run the blocks sequentially in the order they appear in content, and if one fails, don't run the rest. Every tool_use block still needs a tool_result, so answer the batch as follows:
is_error: true with a text description of what went wrong.is_error: true with exactly this text (the browser use tool uses its own halt text):{
"type": "tool_result",
"tool_use_id": "toolu_01Xf5W1sD8Q9aBcJ7kLmN2pQ",
"toolset_name": "computer",
"is_error": true,
"content": "Not executed: an earlier computer action in this turn failed."
}Claude then sees which actions succeeded, which one failed, and which were skipped, and replans on its next turn. A request that leaves any tool_use block in the batch unanswered is rejected with an invalid_request_error, so an agent loop that reads only the first block fails on its next call. If your application asks a human to confirm consequential actions, make that check before each block runs, because a batch can complete a multistep action within one turn.
Claude typically finishes a batch with screenshot so it can observe the outcome before deciding what to do next. When a batch doesn't end with one, your application can attach a screenshot as an extra image block on the last result in the batch so that Claude always sees the current state of the screen, which saves a round trip compared with waiting for Claude to ask. You can also prompt Claude to end every batch with a screenshot (see Optimize model performance with prompting).
Computer use requires a sandboxed computing environment where Claude can safely interact with applications and the web. This environment includes:
Virtual display: A virtual X11 display server (using Xvfb) that renders the desktop interface Claude will see through screenshots and control with mouse/keyboard actions.
Desktop environment: A lightweight UI with window manager (Mutter) and panel (Tint2) running on Linux, which provides a consistent graphical interface for Claude to interact with.
Applications: Pre-installed Linux applications such as Firefox, LibreOffice, text editors, and file managers that Claude can use to complete tasks.
Tool implementations: Integration code that translates Claude's abstract tool requests (such as "move mouse" or "take screenshot") into actual operations in the virtual environment.
Agent loop: A program that handles communication between Claude and the environment, sending Claude's actions to the environment and returning the results (screenshots, command outputs) back to Claude.
When you use computer use, Claude doesn't directly connect to this environment. Instead, your application:
For security and isolation, the reference implementation runs all of this inside a Docker container with appropriate port mappings for viewing and interacting with the environment.
Upgrading an existing computer_20251124 integration? Start with Migrate from computer_20251124; the rest of this section applies to both new and migrated integrations.
The core of computer use is the "agent loop": a cycle where Claude requests tool actions, your application runs them, and returns results to Claude. The loop uses the client you created in the Quick start, a tools array that declares only the computer use toolset, and the tool-call processing helper under Implement the computer use tool. If you also declare other tools, such as the Quick start's bash and text editor tools, dispatch their tool_use blocks in the same pass; the helper answers only computer use member calls, and the loop treats a turn with no answered calls as finished. Here's a simplified example:
def sampling_loop(model: str, messages: list[MessageParam], max_iterations: int = 10):
"""
Run the computer-use agent loop until Claude stops requesting tools
or the iteration limit is reached.
"""
for _ in range(max_iterations):
response = client.messages.create(
model=model,
max_tokens=4096,
messages=messages,
tools=TOOLS,
)
# Add Claude's response to the conversation history
messages.append({"role": "assistant", "content": response.content})
# Run the actions Claude requested, in order, and collect the results
tool_results = process_tool_calls(response)
if not tool_results:
return messages # No more tool use; task complete
# Send every result back to Claude in a single user message
messages.append({"role": "user", "content": tool_results})
return messagesThe loop continues until either Claude responds without requesting any tools (task completion) or the maximum iteration limit is reached. This safeguard prevents potential infinite loops that could result in unexpected API costs.
After each step, take a screenshot and carefully evaluate if you have achieved the right outcome. Explicitly show your thinking: "I have evaluated step X..." If not correct, try again. Only when you confirm a step was executed correctly should you move on to the next one.<robot_credentials>. Using computer use within applications that require login increases the risk of bad outcomes as a result of prompt injection. Review Mitigate jailbreaks and prompt injections before providing the model with login credentials.content array, place the instruction text before the screenshot image. Providing the target description before the image is processed improves click accuracy.zoom action to inspect a region at full resolution when asked about small text or specific UI elements that aren't legible at the screenshot's default resolution, such as file names in a sidebar, tab titles, status-bar text, line numbers, or button labels. If Claude isn't zooming when you expect, ask about a specific region or element rather than the screen as a whole.End each group of actions with a screenshot so you can verify the result before continuing.When you include the computer use tool in a request, the API generates a computer use-specific system prompt. It's similar to the tool use system prompt but starts with:
You have access to a set of functions you can use to answer the user's question. This includes access to a sandboxed computing environment. You do NOT currently have the ability to inspect files or interact with external resources, except by invoking the below functions.
As with regular tool use, the user-provided system parameter is still respected and used in the construction of the combined system prompt.
Each action is a member tool of the computer use toolset: Claude names the member in a tool_use block that carries "toolset_name": "computer", and the block's input holds only that member's parameters, with no action field. The toolset has 17 member tools:
| Member | Input | Description |
|---|---|---|
screenshot | None ({}) | Capture the full display and return it as an image. |
zoom | region: [x0, y0, x1, y1], the top-left and bottom-right corners of the area to inspect | Capture only that region of the display at full resolution and return it as an image, scaled to fit within your usual screenshot dimensions with its aspect ratio preserved. This lets Claude read small text or dense UI that isn't legible in a downscaled full screenshot. |
left_click | coordinate (optional): [x, y]; text (optional): modifier keys to hold during the click: shift, ctrl, alt, super (the Command or Windows key), or a +-joined combination such as ctrl+shift | Click the left mouse button at coordinate, or at the current cursor position when coordinate is omitted. |
right_click, middle_click, double_click, triple_click | Same as left_click | Other mouse buttons and multiple clicks. |
left_click_drag | start_coordinate: [x, y]; coordinate: [x, y]; text (optional): modifier keys | Press at start_coordinate, drag to coordinate, and release. |
mouse_move | coordinate: [x, y] | Move the cursor without clicking, for example, to hover. |
left_mouse_down, left_mouse_up | None ({}) | Press or release the left mouse button at the current cursor position, for drags that left_click_drag can't express. Move the cursor with mouse_move first. |
cursor_position | None ({}) | Report the cursor's current [x, y] position as text. |
scroll | scroll_direction: "up", "down", "left", or "right"; scroll_amount: number of scroll-wheel clicks; coordinate (optional): [x, y]; text (optional): modifier keys | Scroll at coordinate, or at the current cursor position. |
type | text: the string to type | Type literal text at the current keyboard focus. |
key | text: a key or a +-joined combination such as "Return", "ctrl+s", or "alt+Tab"; repeat (optional): 1 to 100, default 1 | Press a key or key combination, repeat times. |
hold_key | text: a key or combination; duration: seconds, up to 300 | Hold a key down for the given duration. |
wait | duration: seconds, up to 300 | Pause before the next action, for example, while an application loads. |
Keep the following in mind when implementing the members:
coordinate, start_coordinate, and region value, and the position that cursor_position reports, is in the pixel space of the full-display screenshots you return, with the origin at the top left. Zoom images don't change this: after a zoom, Claude still expresses coordinates in the full screenshot's space, never relative to the zoomed image. If you scale screenshots down before returning them, scale Claude's coordinates back up before applying them to the real display (see Size screenshots to fit image limits).zoom. If your environment can't produce zoom images, withhold the member with configs (see Tool parameters) rather than leaving it enabled and returning errors. If Claude calls a member that you have withheld or don't implement, return a tool_result with is_error: true for that block.toolset_name, name). toolset_name is what marks a block as a computer action: a custom tool in the same request can share a member's name, and a later toolset version can add members (see Client toolsets).The toolset entry in the tools array accepts four parameters; the rules they share with the browser use toolset are listed under Client toolsets.
| Parameter | Required | Description |
|---|---|---|
type | Yes | computer_toolset_20260801 |
configs | No | Per-member settings keyed by member name; each member accepts enabled (default true for all 17, including zoom) and defer_loading (default false, for tool search), and members you omit keep their defaults. |
cache_control | No | Prompt caching breakpoint at the toolset definition; entry only. A breakpoint on any tool_use or tool_result block in a batch takes effect at the end of that batch; see Tool use with prompt caching. |
allowed_callers | No | ["direct"] only. |
For example, this entry withholds zoom for an environment that doesn't implement it and sets a cache breakpoint at the toolset definition:
{
"type": "computer_toolset_20260801",
"configs": {
"zoom": { "enabled": false }
},
"cache_control": { "type": "ephemeral" }
}If your agent loop can run only one action per round trip, set disable_parallel_tool_use to true in tool_choice; Claude then returns at most one member tool_use block per turn (see Disable parallel tool use).
The entry rejects these parameters from earlier tool versions, and a request that includes any of them returns an invalid_request_error:
name: member names are fixed by the toolset version.display_width_px, display_height_px, and display_number: coordinates are always in the pixel space of the screenshots you return.enable_zoom: zoom is a member tool that you control through configs.The entry also can't be declared in the same request as a computer_20251124 entry or another tool named computer. For strict, input_examples, defer_loading placement, tool_choice, streaming, and caller restrictions, see Client toolsets.
For combining computer use with thinking, see Thinking.
To add other tools alongside computer use, include them in the same tools array. The Quick start section shows this pattern with the bash tool and text editor tool. You can add your own custom tool definitions the same way.
For tasks that stay inside webpages, you can also declare the browser use tool in the same request: the two toolsets work independently, each in its own coordinate frame, and calls to members that share a name, such as screenshot or key, are told apart by toolset_name.
The reference implementation is meant to help you get started with computer use. It includes all of the components needed to have Claude use a computer. However, you can build your own environment for computer use to suit your needs. You'll need:
tool_use results using your tool implementationsThe computer use tool is implemented as a schema-less tool. When using this tool, you don't need to provide an input schema as with other tools; the schema is built into Claude's model and can't be modified.
Set up your computing environment
Create a virtual display or connect to an existing display that Claude will interact with. This typically involves setting up Xvfb (X Virtual Framebuffer) or similar technology.
Implement action handlers
Create functions to handle each action type that Claude might request:
# Placeholder image data; a real executor captures the screen and returns the PNG bytes
PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
def capture_screenshot() -> list[ImageBlockParam]:
# screenshot answers with an image block rather than text: return the result content list
return [
{
"type": "image",
"source": {"type": "base64", "media_type": "image/png", "data": PLACEHOLDER_PNG},
}
]
def click(coordinate=None):
if coordinate is None:
return "clicked at current cursor"
x, y = coordinate
return f"clicked at ({x}, {y})"
def type_text(text):
return f"typed: {text}"
def handle_computer_action(name, tool_input):
if name == "screenshot":
return capture_screenshot()
elif name == "left_click":
# coordinate is optional; without it, click where the cursor already is
return click(tool_input.get("coordinate"))
elif name == "type":
return type_text(tool_input["text"])
# Handle other actions as needed
raise ValueError(f"Unknown or unimplemented member: {name}")Process Claude's tool calls
Extract and run tool calls from Claude's responses:
NOT_EXECUTED = "Not executed: an earlier computer action in this turn failed."
def process_tool_calls(response: Message) -> list[ToolResultBlockParam]:
"""
Run the computer actions in Claude's response in order and answer each
one. After the first failure the rest are skipped, because Claude planned
them assuming the earlier actions succeeded.
"""
tool_results: list[ToolResultBlockParam] = []
failed = False
for block in response.content:
# Only the computer toolset is declared; route other tools here if you add them
if block.type != "tool_use" or block.toolset_name != "computer":
continue
result: ToolResultBlockParam = {
"type": "tool_result",
"tool_use_id": block.id,
"toolset_name": "computer",
}
if failed:
result["content"] = NOT_EXECUTED
result["is_error"] = True
else:
try:
# A string, or a list of content blocks such as the screenshot image
result["content"] = handle_computer_action(block.name, block.input)
except Exception as err:
result["content"] = f"Error: {err}"
result["is_error"] = True
failed = True
tool_results.append(result)
return tool_resultsImplement the agent loop
Wrap the two previous steps in a loop that sends the results back and repeats until Claude returns no member tool calls; Understand the agent loop shows this loop in each language.
Report a failed action to Claude as a tool_result with is_error: true and a short description, and include "toolset_name": "computer" as on any other member result. If the failed action was part of a batch action, answer the remaining blocks in the batch with the halt text shown there instead of running them.
For example, when screenshot capture fails:
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_01A09q90qw90lq917835lq9",
"toolset_name": "computer",
"content": "Error: Failed to capture screenshot. Display may be locked or unavailable.",
"is_error": true
}
]
}Use the same shape for coordinates outside the display bounds and for actions that fail to run, with a message that says what went wrong.
Screenshots and zoom images that you return to the computer use toolset must already fit within your model's image size limits: the toolset takes no display dimensions and the API doesn't downscale for you, so an oversized tool_result image is rejected with a validation error. Because Claude returns coordinates in the pixel space of the image it sees, keep the scale factor you used so you can map those coordinates back to your screen.
If your screen is larger than the limit, resize each screenshot before returning it and scale Claude's returned coordinates back to the original screen space. Because the toolset takes no display dimensions, the resize and the coordinate scaling in your application code are all you need:
import math
screen_width, screen_height = 1512, 982
def get_scale_factor(width, height):
"""Calculate scale factor to meet API constraints."""
long_edge = max(width, height)
total_pixels = width * height
long_edge_scale = 1568 / long_edge
total_pixels_scale = math.sqrt(1_150_000 / total_pixels)
return min(1.0, long_edge_scale, total_pixels_scale)
# When capturing screenshot
scale = get_scale_factor(screen_width, screen_height)
scaled_width = int(screen_width * scale)
scaled_height = int(screen_height * scale)
# Resize image to scaled dimensions before sending to Claude
screenshot = capture_and_resize(scaled_width, scaled_height)
# When handling Claude's coordinates, scale them back up
def execute_click(x, y):
screen_x = x / scale
screen_y = y / scale
perform_click(screen_x, screen_y)When you choose a display resolution and return screenshots:
Long agent loops accumulate screenshots quickly (roughly 1,000–1,800 input tokens each). The API's request limits also apply. Once a single request carries more than 20 images, every image in it is held to a stricter per-side limit. A loop that keeps its screenshot history reaches that count within a few dozen turns, so either resize each screenshot so that neither side exceeds 2000 px or prune older screenshots to keep 20 or fewer in the request.
To keep Prompt caching effective while bounding context:
cache_control breakpoint after the system prompt and tool definitions, and up to three more on the last tool_result block of each of the most recent turns, advancing them each turn. Within a batch action, markers on several blocks act as a single breakpoint but each still counts toward the limit of four, so use one per turn.If clicks miss their targets, the cause is usually one of the following:
| Symptom | Likely cause | Try |
|---|---|---|
| Clicks consistently offset in one direction | Claude's coordinates, which are in the pixel space of the screenshots you return, are being applied to a display of a different size without scaling | Scale each coordinate by the ratio of your screen size to your screenshot size before clicking (see Size screenshots to fit image limits); on macOS Retina displays, account for the 2x device pixel ratio |
| Clicks land in the right area but miss the target | Target is very small, detail was lost downscaling a 4K+ source, or aspect ratio was distorted | Keep the zoom member enabled and implement it so Claude can inspect the region at full resolution; capture at lower DPI or crop to the relevant region; preserve aspect ratio when resizing |
| Claude clicks the wrong element entirely | Ambiguous instruction, or visually similar elements nearby | Use positional prompts ("the blue Submit button in the bottom-right"); break the interaction into smaller steps |
| Accuracy is consistently poor | Resolution too low | Try 1280x720 as a baseline |
computer_20251124Upgrading from computer_20251124 to the toolset is optional: the models listed for computer_20251124 under Earlier tool versions keep accepting it with its beta header, so an existing integration keeps working until you change it. To upgrade, make the following changes together:
anthropic-beta: computer-use-2025-11-24 from your requests. In the SDKs, remove the betas parameter and call the Messages API through the standard client rather than the beta namespace.tools entry. Set type to computer_toolset_20260801 and delete name, display_width_px, display_height_px, display_number, and enable_zoom. The toolset rejects each of these fields.enable_zoom defaults to false. If your environment doesn't implement zoom, add "configs": {"zoom": {"enabled": false}} to keep the previous behavior; otherwise implement it (see Available actions).tool_use block in a response rather than reading only the first, and to dispatch on the block's name together with toolset_name instead of on input.action. Member inputs no longer contain an action field; the remaining fields are unchanged.Not executed: an earlier computer action in this turn failed. as described in Batch actions. If your loop can't run batches yet, Tool parameters explains how to limit Claude to one action per turn.toolset_name on results. Add "toolset_name": "computer" to every tool_result that answers a member call. Results may contain only text and image content.repeat on key. The key member accepts an optional repeat count from 1 to 100. A handler that ignores unrecognized fields would press the key once, so make your key handler honor repeat.defer_loading from the entry into configs, with the same value on every enabled member. The other options not supported on toolset entries are listed under Client toolsets.This is the tools entry before the change, sent with the anthropic-beta: computer-use-2025-11-24 header:
{
"type": "computer_20251124",
"name": "computer",
"display_width_px": 1024,
"display_height_px": 768,
"display_number": 1
}This is the tools entry after the change, sent with no beta header. The configs object keeps zoom off to match the earlier entry, which doesn't set enable_zoom; omit configs entirely to accept the default and let Claude zoom:
{
"type": "computer_toolset_20260801",
"configs": {
"zoom": { "enabled": false }
}
}The following pair shows a tool_use block before and after the change. The action name moves from input.action to name, and the block gains toolset_name:
{
"type": "tool_use",
"id": "toolu_01A9r5kQm2LxWc7vT3nZ4bJs",
"name": "computer",
"input": { "action": "left_click", "coordinate": [500, 300] }
}{
"type": "tool_use",
"id": "toolu_01A9r5kQm2LxWc7vT3nZ4bJs",
"name": "left_click",
"toolset_name": "computer",
"input": { "coordinate": [500, 300] }
}Two earlier versions of the computer use tool remain available in beta for existing integrations, for models that don't support the toolset, and on platforms where the toolset isn't currently available. Each requires its beta header on every request, and their parameters are documented in the beta Messages API reference. In the SDKs, pass the header through the betas parameter and use the beta namespace; only the computer use tool needs the header, not the bash or text editor tools in the same request.
| Tool version | Beta header | Use with | Parameters |
|---|---|---|---|
computer_20251124 | computer-use-2025-11-24 | Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Opus 4.5 | API reference |
computer_20250124 | computer-use-2025-01-24 | Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.1 (retired, except on Bedrock and Google Cloud), Claude Sonnet 4 (retired, except on Bedrock and Google Cloud), and Claude Opus 4 (retired, except on Google Cloud) | API reference |
display: "summarized" on the thinking configuration, because the models that support the toolset omit thinking text by default.left_mouse_down, left_mouse_up) and modifier-key combinations to select individual cells. Complex spreadsheet operations might still require multiple attempts.Always carefully review and verify Claude's computer use actions and logs. Do not use Claude for tasks requiring perfect precision or sensitive user information without human oversight.
Computer use is a client-side tool. All screenshots, mouse actions, keyboard inputs, and any files involved in a session are captured and stored in your environment, not by Anthropic. Anthropic processes the screenshot images and action requests in real time as part of the API call. Retention for those API requests is governed by API and data retention.
Because your application controls where and how computer use data is stored, computer use is ZDR eligible. For ZDR eligibility across all features, see API and data retention.
Computer use follows the standard tool use pricing. When using the computer use tool:
Toolset definition overhead: Declaring computer_toolset_20260801 with its default members adds about 4,500 input tokens to a request (about 4,520 on Claude Fable 5, Claude Mythos 5, Claude Opus 5, and Claude Opus 4.8, and about 4,590 on Claude Sonnet 5), which covers the member tool definitions and the tool use system prompt. Disabling zoom with configs removes about 410 of those tokens. The exact count for a request is reported in the response usage, and you can estimate it in advance with the token counting endpoint.
Earlier tool versions: The following figures apply to the computer_20251124 and computer_20250124 tool versions, not to computer_toolset_20260801:
computer_20250124)Additional token consumption:
Fix the most common tool-use errors with symptom-to-fix diagnostic tables.
Get started with the complete Docker-based implementation
Connect Claude to external tools and APIs. See where tools execute, when Claude calls them, and which tool fits your task.
Benchmarked recommendations for resolution, thinking effort, and context management
Let Claude navigate, read, and interact with webpages in your own browser environment, for tasks that stay inside the browser.
| Supported models |
|
|---|---|
| Supported platforms |
|
computer_20251124 tool version, which requires a beta header; see Earlier tool versions.Was this page helpful?