🎓 All Courses | 📚 OpenAI API University Syllabus
Stickipedia University
📋 Study this course on TaskLoco

GPT-4o Vision lets you send images to the API and ask questions about them — receipts, screenshots, diagrams, photos, documents.

Sending an Image

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What's in this image?"},
            {
                "type": "image_url",
                "image_url": {"url": "https://example.com/photo.jpg"}
            }
        ]
    }]
)

Also Works With Base64

For local images, encode as base64 and use "url": "data:image/jpeg;base64,{base64_string}"


YouTube • Top 10
OpenAI API University: Vision — Analyze Images With GPT-4o
Tap to Watch ›
📸
Google Images • Top 10
OpenAI API University: Vision — Analyze Images With GPT-4o
Tap to View ›

Reference:

Vision API documentation

image for linkhttps://en.wikipedia.org/wiki/Special:Search?search=Vision

📚 OpenAI API University — Full Course Syllabus
📋 Study this course on TaskLoco

TaskLoco™ — The Sticky Note GOAT