Generative AI
Beginner
4.5

Multimodal Prompting: Ask About Images

Send images to a model and ask questions about them.

0h 20m
1 lesson
1.2K students

What You'll Learn

Learning objectives will be added soon.

Tutorial Content

Text + image in one request

Modern models accept images alongside text. Pass an image URL or base64 data and ask away.

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": [
        {"type": "text", "text": "What's unusual in this photo?"},
        {"type": "image_url", "image_url": {"url": IMAGE_URL}},
    ]}],
)
print(resp.choices[0].message.content)

Great use cases

  • Describe or caption images for accessibility
  • Extract text and data from screenshots or receipts
  • Answer questions about charts and diagrams

Be specific about what you want the model to look for — vague questions get vague answers here too.

Your Progress

Sign in to track your progress

Tags

Multimodal
LLM
API