Claude API · Shaping requests

Ask about an image

Pass an image by URL, or as base64 with media_type, in the user message before the question.

response = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=16000,
    messages=[{
        "role": "user",
        "content": [
            {"type": "image", "source": {"type": "url", "url": "https://example.com/image.png"}},
            {"type": "text", "text": "Describe this image"},
        ],
    }],
)

Official Claude API documentation

More shaping requests commands

All shaping requests commands · Claude API cheatsheet

Was this page helpful?