API usage primer for Claude changedclaude_api_primer
Nearest release: v2.1.309, published 3 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+4added
Lines−4removed
From line
145
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits20to this page, all time
The whole hunk
from line 145, old and new numbered
/
from line 145
145145
146146<CodeGroup exclude="shell:cURL, typescript, csharp, go, java, php, ruby">
147147 ```bash CLI
148 # Option 1: Base64-encoded image (@ prefix auto-encodes binary files as base64)
148 # Option 1: base64-encoded image (@ prefix auto-encodes binary files as base64)
149149 curl -sSo vision-example.jpg \
150150 https://platform.claude.com/docs/images/vision-example.jpg
151151
from line 185
185185 import base64
186186 import httpx2
187187
188 # Option 1: Base64-encoded image
188 # Option 1: base64-encoded image
189189 image_url = "https://platform.claude.com/docs/images/vision-example.jpg"
190190 image_media_type = "image/jpeg"
191191 image_data = base64.standard_b64encode(httpx2.get(image_url).content).decode("utf-8")
from line 339
339339
340340 weather_data = {"temperature": 72}
341341
342 # First request - Claude responds with thinking and tool request
342 # First request: Claude responds with thinking and tool request
343343 response = client.messages.create(
344344 model="claude-opus-5-5",
345345 max_tokens=16000,
from line 356
356356 (block for block in response.content if block.type == "tool_use"), None
357357 )
358358
359 # Second request - Include thinking block and tool result
359 # Second request: include thinking block and tool result
360360 continuation = client.messages.create(
361361 model="claude-opus-5-5",
362362 max_tokens=16000,
No line in this hunk matches that.