Skip to main content
Lesson 11 of 16 · Getting started with Grok & xAI

Understand and analyze images

Lesson 11 of 16 Updated July 29, 2026 Beginner
On this page
  1. Grok’s vision
  2. How to submit an image
  3. What you can actually ask
  4. Set the level of detail
  5. Constraints to know
  6. Key takeaways

Grok’s vision

Grok isn’t limited to text. The grok-4.5 models and later include vision capabilities that let them analyze images you provide as input. You can submit a photo, a screenshot, a chart, or any other visual, and Grok will give you a detailed description, an analysis, or a contextual answer. That moves the line on what you can hand it: a photographed dashboard, a crumpled invoice, or an app mockup become usable documents, just like text pasted into the conversation.

How to submit an image

On grok.com, it takes four steps:

  1. Click the attachment button in the input field
  2. Select the image from your device
  3. Optionally add a text message to guide the analysis
  4. Send your message

On mobile, you can also take a photo directly with your phone’s camera and send it to Grok for analysis. It’s the fastest way when you’re facing a sign, a menu, or a screen you can’t copy and paste.

For developers, you send images through a mixed array of objects in the input field:

response = client.responses.create(
    model="grok-4.5",
    input=[
        {"type": "input_image", "image_url": "https://exemple.com/photo.jpg"},
        {"type": "input_text", "text": "Describe this image in detail"}
    ]
)

You can provide images as a public URL or base64-encoded. The choice matters: a public URL requires an image that’s reachable from outside, which rules out internal documents; base64 makes the request heavier but is the only option for a confidential file.

What you can actually ask

Description is the most immediate use. Grok details the objects present, the colors, the composition, the mood, and the people and their expressions. You still need to frame the request, or you’ll get a flat inventory:

Describe this photograph in detail.
What is the main subject, and what secondary
elements do you notice?

Text extraction, or OCR, is probably the most valuable everyday use. Grok reads and transcribes text from photos of documents, screenshots, signs and posters, restaurant menus, and business cards: all cases where retyping the information by hand takes several minutes. Asking for formatting at the same time saves a second round trip:

Extract all the visible text in this image
and lay it out in a readable way.

Analyzing charts and diagrams goes beyond reading: Grok interprets statistical charts, flowcharts, and technical diagrams, and can tell you what they show. It’s especially useful when a PDF report locks its conclusion inside a figure:

Analyze this chart. What are the main trends,
and what conclusions can we draw?

You can also submit several images in the same request so Grok can compare them, which turns a design review into a conversation:

Here are two versions of a design. What are the
main differences between them?

Finally, designers and developers use this vision on their own screens, asking for a usability critique rather than a description:

Analyze this mobile app screenshot.
What usability problems do you see?

Set the level of detail

Through the API, the detail parameter controls how deeply the image is analyzed and accepts three values:

  • auto: the model picks the appropriate level (default)
  • low: fast, inexpensive analysis that uses fewer tokens
  • high: detailed, in-depth analysis that uses more tokens

This setting trades precision against cost, case by case. For simple OCR on an invoice, low is enough and cuts the cost across thousands of documents; for fine artistic analysis or a dense chart, high avoids misreadings.

Constraints to know

ConstraintValue
Maximum size20 MiB per image
Accepted formatsJPG, JPEG, and PNG only
Number of imagesNo limit per request
Token usageBetween 256 and 1,792 tokens depending on size and level of detail

A few habits get the most out of these capabilities. Frame your request rather than asking for a general description: “how many items are out of stock in this screenshot” beats “describe this image.” Resize large files, which slow processing without adding anything. Always include a text message with the image, because context noticeably improves the relevance of the answer. And follow the logic of the formats: JPG for photographs, PNG for screenshots and any visual containing text, since JPG compression blurs fine characters and makes OCR fail.

Key takeaways

  • The grok-4.5 models and later can analyze images submitted as input
  • Use cases include description, OCR, chart analysis, and comparison
  • You can provide images by URL or in base64
  • The detail setting lets you control the trade-off between precision and cost
  • Maximum size is 20 MiB, in JPG and PNG formats only