Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

vision-coordinates changedbuild-with-claude/vision-coordinates

Nearest release: v2.1.301, published 5 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+16added
Lines−20removed
From line 43 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits9to this page, all time

The whole hunk

from line 43, old and new numbered
/
lines
from line 43
4343 
4444First check which resolution tier your model is on (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)) and pass the matching edge and token limits. The following reference implementation computes the exact size Claude resizes an image to:
4545 
46<CodeGroup>
47 ```bash cURL
48 # This reference implementation is local math that makes no API request, so
49 # there's nothing to show for cURL. See the SDK tabs.
50 ```
46<CodeGroup exclude="shell">
47 <CodeGroupItem language="cURL">
48 Compute this size in code.
49 </CodeGroupItem>
5150 
52 ```bash CLI
53 # This reference implementation is local math that makes no API request, so
54 # there's nothing to show for the CLI. See the SDK tabs.
55 ```
51 <CodeGroupItem language="CLI">
52 Compute this size in code.
53 </CodeGroupItem>
5654 
5755 ```python Python
5856 import math
from line 482
484482 
485483Screenshots and zoom images that you return to the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates) toolsets are an exception to automatic resizing. The API rejects a `tool_result` image that exceeds the model's limits with a validation error instead of resizing it. Resize those images in your application before returning them, then scale the coordinates Claude returns back to your screen's dimensions.
486484 
487<CodeGroup>
488 ```bash cURL
489 # This local coordinate conversion makes no API request, so there's nothing
490 # to show for cURL. See the SDK tabs.
491 ```
485<CodeGroup exclude="shell">
486 <CodeGroupItem language="cURL">
487 Convert the coordinates in code.
488 </CodeGroupItem>
492489 
493 ```bash CLI
494 # This local coordinate conversion makes no API request, so there's nothing
495 # to show for the CLI. See the SDK tabs.
496 ```
490 <CodeGroupItem language="CLI">
491 Convert the coordinates in code.
492 </CodeGroupItem>
497493 
498494 ```python Python
499495 # This helper calls resized_size from the resize example on this page.
Feedback