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

working-with-messages changedbuild-with-claude/working-with-messages

Nearest release: v2.1.304, published under an hour after 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+5added
Lines−9removed
From line 508 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits18to this page, all time

The whole hunk

from line 508, old and new numbered
/
lines
from line 508
508508 #!/bin/sh
509509 
510510 # Option 1: Base64-encoded image
511 IMAGE_URL="https://platform.claude.com/docs/images/vision-example.jpg"
512 IMAGE_MEDIA_TYPE="image/jpeg"
513 IMAGE_BASE64=$(curl "$IMAGE_URL" | base64 | tr -d '\n')
511 IMAGE_BASE64=$(curl "https://platform.claude.com/docs/images/vision-example.jpg" | base64 | tr -d '\n')
514512 
515513 curl https://api.anthropic.com/v1/messages \
516514 -H "x-api-key: $ANTHROPIC_API_KEY" \
from line 522
524522 {"role": "user", "content": [
525523 {"type": "image", "source": {
526524 "type": "base64",
527 "media_type": "$IMAGE_MEDIA_TYPE",
525 "media_type": "image/jpeg",
528526 "data": "$IMAGE_BASE64"
529527 }},
530528 {"type": "text", "text": "What is in the above image?"}
from line 552
554552 ```
555553 
556554 ```bash CLI
557 IMAGE_URL="https://platform.claude.com/docs/images/vision-example.jpg"
558 
559555 # Option 1: Base64-encoded image (CLI auto-encodes binary @file refs)
560 curl -s "$IMAGE_URL" -o ./vision-example.jpg
556 curl -s "https://platform.claude.com/docs/images/vision-example.jpg" -o ./vision-example.jpg
561557 
562558 ant messages create <<'YAML'
563559 model: claude-opus-5-5
from line 571
575571 YAML
576572 
577573 # Option 2: URL-referenced image
578 ant messages create <<YAML
574 ant messages create <<'YAML'
579575 model: claude-opus-5-5
580576 max_tokens: 1024
581577 messages:
from line 580
584580 - type: image
585581 source:
586582 type: url
587 url: $IMAGE_URL
583 url: https://platform.claude.com/docs/images/vision-example.jpg
588584 - type: text
589585 text: What is in the above image?
590586 YAML
Feedback