AnyLearn
All lessons
AIbeginner

Multimodal AI: text, images, audio, video in one model

What "multimodal" actually means once you get past marketing copy. How modern models like GPT-4o, Gemini, and Claude blend modalities, and the design trade-offs (early vs late fusion, native vs adapted) you'll meet when building with them.

Not signed in โ€” your progress and quiz score won't be saved.
Lesson progress1 / 8

What "multimodal" really means

A modality is a kind of signal: text, images, audio, video, even structured data. A model is multimodal if it can consume more than one and reason across them.

The shortest useful definition: a multimodal model can answer a question like "in the screenshot I just attached, why is the button greyed out?" โ€” where the question requires looking at the image and understanding the text together.

Not every "AI that handles images" is multimodal. A pipeline that calls an OCR service, then sends the text to GPT, is not a multimodal model โ€” it's a multimodal system stitched from single-modality parts. The distinction matters because end-to-end models retain visual nuance (layout, colour, gesture) that text extraction throws away.

Full lesson text

All 8 steps on one page โ€” for reading, reference, and search.

Show

1. What "multimodal" really means

A modality is a kind of signal: text, images, audio, video, even structured data. A model is multimodal if it can consume more than one and reason across them.

The shortest useful definition: a multimodal model can answer a question like "in the screenshot I just attached, why is the button greyed out?" โ€” where the question requires looking at the image and understanding the text together.

Not every "AI that handles images" is multimodal. A pipeline that calls an OCR service, then sends the text to GPT, is not a multimodal model โ€” it's a multimodal system stitched from single-modality parts. The distinction matters because end-to-end models retain visual nuance (layout, colour, gesture) that text extraction throws away.

2. Three common modalities you'll work with

  • Text is the universal anchor โ€” every multimodal model treats text as the dominant signal and other modalities as context.
  • Images are the next most mature. Modern frontier models handle photos, screenshots, diagrams, charts, hand-written notes, and small amounts of OCR-able text well.
  • Audio comes in two flavours: speech (which most models still transcribe via a separate ASR step) and general audio (music, ambient sound), which only a few models handle natively.
  • Video is the frontier. Models typically sample a handful of frames and reason over those plus the audio track.

The quality bar drops as you move down this list. Image understanding is excellent today; native audio reasoning is uneven; video is still rough.

3. Fusion: early vs late

How a model combines modalities is its fusion strategy.

  • Late fusion (older): each modality is processed by its own model, then results are combined at the end. Easy to build, robust, but loses cross-modal reasoning. Example: OCR โ†’ LLM.
  • Early fusion (modern): all modalities are projected into a shared representation early in the network, then a single transformer processes them together. The model can attend to text and image positions in the same forward pass.

Frontier multimodal models (GPT-4o, Claude 4, Gemini) use early fusion. That's why they can do things like "describe the third chart from the top" โ€” they're processing the image regions and the prompt tokens in a unified attention space.

4. Late vs early fusion

Same task, two architectures.

flowchart TD
  L1["Late fusion: OCR"] --> L2["Text-only LLM"]
  L2 --> L3["Answer"]
  E1["Early fusion: image"] --> E3["Multimodal transformer"]
  E2["Early fusion: text"] --> E3
  E3 --> E4["Answer"]

5. Calling a multimodal model in code

All major APIs accept a list of content blocks where each block declares its type. The Anthropic SDK is representative:

import anthropic, base64
client = anthropic.Anthropic()

with open("chart.png", "rb") as f:
    img = base64.b64encode(f.read()).decode()

r = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=1024,
    messages=[{
        "role": "user",
        "content": [
            {"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": img}},
            {"type": "text", "text": "What's the trend in this chart? One sentence."},
        ],
    }],
)
print(r.content[0].text)

Text and image arrive in the same message. The model sees them together.

6. Where multimodal genuinely changes the game

Concrete tasks that go from impossible to easy:

  • UI debugging: "why doesn't this button work?" + screenshot of the broken state
  • Form processing: receipts, ID cards, contracts โ€” fields and layout
  • Diagram understanding: architecture sketches, ER diagrams, flowcharts
  • Accessibility: alt-text generation for arbitrary images
  • Voice-first apps: conversation with no transcription latency (when audio is native)
  • Educational content: "explain this graph" / "what's in this microscope image"

What doesn't work well yet: long videos (cost + frame sampling artefacts), audio reasoning beyond speech, real-time interactive vision.

7. Cost and latency gotchas

Images are expensive. A single 1024ร—1024 image is typically billed at ~1,500โ€“2,000 tokens, depending on the model's tiling scheme. A user uploading 10 high-res screenshots is sending ~20K input tokens before they type a word.

  • Resize aggressively before sending โ€” most providers downscale anyway, and you pay the original size.
  • Prefer text for things that can be text. "Here's the JSON of my form" beats "here's a screenshot of my form".
  • Batch images in one message rather than one per turn โ€” caching benefits compound.
  • Audio and video scale roughly linearly with duration. Set hard limits in your UI.

For anything user-facing, instrument per-modality token usage. Surprises here can be 10x your text-only budget.

8. How to evaluate a multimodal feature

Standard text evals don't catch multimodal failures. Build a small fixture set per modality, then test things text alone can't:

  1. Same prompt, different image: does the answer actually change?
  2. Same image, different prompts: does the model pull the right region/info each time?
  3. Adversarial pairs: an image and prompt that disagree โ€” does the model trust the right one?
  4. Ablation: remove the image; does the model hallucinate an answer anyway? (It often does.)

If removing the image doesn't change the output, you're paying multimodal prices for a text-only feature.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. An app pipes user-uploaded receipts through Tesseract OCR and sends the extracted text to GPT. Is this a multimodal model?
    • Yes, because it processes images
    • No โ€” it's a multimodal *system* built from single-modality components
    • Yes, because GPT can also accept images directly
    • No, because Tesseract only handles English
  2. Which fusion strategy lets a model directly attend to image regions and text tokens in the same forward pass?
    • Late fusion
    • Early fusion
    • Cascade fusion
    • Both produce the same result
  3. Roughly how much input cost should you budget for sending a single 1024ร—1024 image to a frontier multimodal model?
    • About 100 tokens
    • About 500 tokens
    • Roughly 1,500โ€“2,000 tokens
    • Roughly 10,000 tokens
  4. Your eval set has the model answer questions about charts. To check whether the model is actually *looking* at the charts, what's the most useful additional test?
    • Run the same prompt many times and check temperature sensitivity
    • Run the prompt *without* the chart and see if you get the same answer
    • Use a larger model to see if accuracy improves
    • Ask the model to describe the chart before answering
  5. Which modality is currently the *least* reliable in end-to-end form across frontier models?
    • Static images
    • Text
    • Long-form video
    • Speech transcription

Related lessons

Science
intermediate

Nuclear fusion: physics, approaches, engineering

What it takes to fuse hydrogen isotopes โ€” the four conditions (temperature, density, confinement time, energy gain), the three main approaches (magnetic, inertial, magnetized target), the engineering problems (tritium, neutrons, materials) that remain after the physics is in hand.

8 stepsยท~12 min
AI
advanced

Loop engineering: verification, orchestration, and anti-patterns

Make loops trustworthy. Adversarial verification panels, sub-agent orchestration, loop-until-dry for unbounded discovery, loop-until-budget for paid depth, multi-modal sweeps with diverse prompts, eval-driven cap selection, and the five anti-patterns โ€” silent caps, infinite plans, drift, premature termination, thrashing โ€” that ship to prod more than they should.

9 stepsยท~14 min
AI
intermediate

Loop engineering in production: state, errors, and budgets

Once an agent loop runs past a few iterations the failure surface shifts: state bloats, tool calls fail in three distinct ways, retries multiply if you stack them wrong, and unbounded budgets rack up four-figure bills overnight. The state, errors, and budgets you need to make the loop survive contact with reality.

8 stepsยท~12 min
AI
beginner

Loop engineering basics: the agent control loop

How LLM agents actually run: the iterative prompt-action-observation loop, the ReAct shape, the smallest tool-calling loop in twelve lines, why you always stack three termination layers, what the model sees on iteration N, and when a single prompt is the better answer.

8 stepsยท~12 min