Skip to main content
Lesson 1 of 12 · Vision and Image Analysis via API

Introduction to Vision via the Mistral API

Lesson 1 of 12 Updated November 3, 2026 Developer
On this page
  1. What Is the Vision API?
  2. Why Use Mistral Vision?
  3. Available Vision Models
  4. Your First Vision Call
  5. Structure of a Multimodal Message
  6. What You Will Learn in This Course
  7. Key Takeaways

Update November 2, 2026 — models. Mistral Large 3 (mistral-large-2512) and Mistral Medium 3.5 have been deprecated since October 31, 2026, and will be retired on April 30, 2027. Their designated successor, Mistral Large 4 (mistral-large-4), has been in public preview since October 6. The examples in this course use the alias mistral-large-latest, which still points to Mistral Large 3 according to its official specification (verified November 3, 2026). Similarly, mistral-medium-latest points to Mistral Medium 3.5. These aliases will remain valid until April 30, 2027. For new projects, test mistral-large-4, their designated successor.

What Is the Vision API?

Language models no longer stop at text. Since 2024, Mistral AI has offered multimodal models capable of analyzing text and images simultaneously. This capability, called Vision, changes the nature of the work you can automate: a photographed invoice, a dashboard screenshot, or a technical diagram ceases to be an opaque attachment that a human must open. Instead, these become inputs your code queries, exactly as it would query a string.

The scope is broad: document analysis, chart reading, and visual data extraction. An accounting firm receiving three hundred scanned receipts per month can ask the model to read the amounts; a product team can automatically describe screenshots submitted by users. In this course, you will learn to leverage the Mistral Vision API to integrate this type of analysis into your Python applications. Each lesson combines an explanation of the mechanism with ready-to-use code.

Why Use Mistral Vision?

The first argument is the lack of technical disruption. You call the same chat.complete() endpoint used for text: there is no separate API to learn, no distinct client to instantiate. You simply add images to the message. A project already built on text generation accommodates vision without a redesign.

The second is model choice. From the most powerful, Mistral Large 3, to the lightest in the Ministral 3 family, you adjust the quality/cost trade-off to your case: a heavy model for fine-grained analysis of a financial chart, a light model to sort ten thousand photos by category. You make this adjustment in a single line of code, as you will see in Lesson 3.

Two more strategic considerations apply. The message format follows the OpenAI-like standard, which facilitates migration from another provider: the code for building messages remains practically unchanged. And because Mistral is a French company, your data can stay in Europe, a often decisive factor when images contain personal or contractual information.

Available Vision Models

Five Mistral models support vision. Each is identified by an API ID that you pass to the model parameter.

ModelAPI IDPrimary Use Case
Mistral Large 3mistral-large-2512Complex analysis, highest quality
Mistral Medium 3.5mistral-medium-latestGood quality/speed balance
Mistral Small 4mistral-small-latestEveryday use, fast and economical
Ministral 3 14Bministral-14b-2512Edge computing, low latency
Ministral 3 8Bministral-8b-2512Embedded systems, limited resources

All these models accept images as input via the Chat Completions API. In other words, the code you are about to write will work identically with all five.

Two forms of identifiers coexist in this table, and choosing between them is an architectural decision. The -latest aliases automatically track the current version of the model: your calls benefit from improvements without touching your code, at the cost of behavior that may evolve under your feet. Dated identifiers like mistral-large-2512 pin a specific version: behavior remains stable, but you must track deprecations. Use the alias for a prototype; for a production pipeline with validated outputs, pin the version and plan your upgrades.

Your First Vision Call

Here is a minimal example to send an image to Mistral and get a description:

from mistralai.client import Mistral

client = Mistral(api_key="YOUR_API_KEY")

response = client.chat.complete(
    model="mistral-small-latest",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Describe this image in detail."},
                {
                    "type": "image_url",
                    "image_url": "https://example.com/photo.jpg"
                }
            ]
        }
    ]
)

print(response.choices[0].message.content)

One detail distinguishes this call from a standard text call, and it deserves attention: the content field of the user message is an array (a list) instead of a simple string. This structure is what allows mixing text and images in a single turn.

Structure of a Multimodal Message

A standard text-only message fits on one line:

{"role": "user", "content": "Hello, how are you?"}

A multimodal message replaces that string with a list of typed elements, each announced by its type field:

{
    "role": "user",
    "content": [
        {"type": "text", "text": "Your question here"},
        {"type": "image_url", "image_url": "URL or data URI of the image"}
    ]
}

Nothing forces you to limit yourself to one element of each kind. You can include multiple text and image_url elements in a single message. This is precisely what allows you, for example, to present a reference image and then an image to compare, introducing each with a sentence. We will cover this in detail in the following lessons.

What You Will Learn in This Course

This 12-lesson course progresses from mechanism to application. Lessons 1 to 3 cover multimodal models: what actually happens when an image enters the model, and how to choose the one that fits your workload. Lessons 4 to 6 cover sending images, by URL, in Base64, and then multiple images in a single message. Lessons 7 to 10 walk through concrete use cases—chart analysis, OCR, structured extraction, and image comparison. Lessons 11 and 12 wrap up the topic with limits, cost optimization, and possible extensions.

Key Takeaways

  • The Mistral Vision API uses the same endpoint as text chat
  • The user message becomes an array containing text and image_url elements
  • Five models support vision, from the most powerful to the lightest
  • Mistral is a relevant choice for projects requiring European data sovereignty