Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Vision — Sending Images to Claude in Go

Video #07 — Claude API in Go Series
Publish date: 2026-07-13
Type: Lightweight
Est. duration: ~15 min

What we cover

  • Passing images to Claude via public URL
  • Encoding local images as base64 and sending them via the Go SDK
  • Building mixed text-and-image messages with NewImageBlockParam
  • Practical examples: screenshot analysis, document parsing

Prerequisites

  • Go 1.23+
  • An Anthropic API key
  • Familiarity with episodes 01–02 (basic completions and message structure)

Running the example

cd 07-vision
export ANTHROPIC_API_KEY=your_key_here
go run main.go

For the file-based example, drop a screenshot.png in the directory.

Project structure

.
├── README.md
├── go.mod
├── go.sum
└── main.go