01Chapter 1: How multimodal models read images and documentsThis chapter builds the working model for the rest of the tutorial. It explains what a multimodal model does with an image or a PDF, why that matters for cost and accuracy, and which mistakes beginners make most often. Later chapters cover the request formats and code in detail.7 min read
02Chapter 2: Mixing text and images in one messageThis chapter assumes you can call an LLM chat API through an SDK or over HTTP, read and write JSON request bodies, and read files as bytes in Python. It also assumes you know what tokens and context windows are. You will learn how a single message carries text and images together, how block order af5 min read
03Chapter 3: Supported formats and size limitsThis chapter covers which image and document formats multimodal APIs accept, which limits you will hit, and how to check inputs before you send them. It assumes you can read files and bytes in Python, have called an LLM chat API before, and know what tokens and context windows are.5 min read
04Chapter 4: Choosing how to supply the data: base64, URL or fileThis chapter covers the three ways to hand an image or document to a multimodal model, and how to pick one. It assumes you can read files as bytes in Python, have called a chat API through an SDK, and understand JSON request bodies and what a token is. The tutorial's other chapters cover the content6 min read
05Chapter 5: Sending your first imageThis chapter builds a working image request, first with base64 data and then with a URL. It covers both the Anthropic Messages API and the OpenAI Responses API. It also covers the errors you are most likely to hit.5 min read
06Chapter 6: Resizing and normalizing images before sendingThis chapter covers preparing images before you put them in a request. It assumes you can read files as bytes, have called an LLM chat API, and know that images consume tokens from the context window. Earlier chapters showed how to build an image content block and which formats and size limits apply5 min read
07Chapter 7: What images and pages cost in tokens and timeThis chapter assumes you can call an LLM chat API from Python, know what tokens and context windows are, and have read the earlier chapters on content blocks, base64 data and image preprocessing. It covers how visual inputs consume tokens, how that affects price and latency, and how to reduce both w6 min read
08Chapter 8: Sending several images and placing the promptThis chapter assumes you can already send a single image in a request, as covered in "Sending your first image". You should know what a content block is and have a helper that returns a media type and base64 text for a local file. Here you extend that to several images and decide where the text inst6 min read
09Chapter 9: Sending a PDF directlyThis chapter assumes you can call an LLM chat API from Python, you know how to build a JSON request body, and you have read the earlier chapters on content blocks and base64 encoding. It covers the native PDF path: giving the provider the whole file and letting it read the text and the page visuals.5 min read
10Chapter 10: Rendering PDF pages as imagesThis chapter assumes you can call a vision-capable LLM API with an image content block, that you know how base64 encoding works, and that you have read the earlier chapters on image preprocessing and on sending a PDF natively. Here you will turn each page of a PDF into an image yourself, and then se5 min read
11Chapter 11: Deciding between text extraction, page images and native PDFThis chapter helps you pick one of three ways to give a PDF to a multimodal model. It assumes you can already send an image and a native PDF in a request, know that PDFs are processed as text plus page visuals, and understand token costs and context windows. If any of that is unfamiliar, review the 6 min read
12Chapter 12: Uploading files once and reusing themThis chapter assumes you can already send an image or PDF inline as base64 (covered in the earlier chapters on content blocks and sending your first image). It also assumes you know what a token is. Here you will upload a file once, get back an identifier, and refer to that identifier in later reque5 min read
13Chapter 13: Extracting structured data from images and PDFsThis chapter assumes you can already send an image or PDF to a multimodal model with content blocks, as covered in earlier chapters. It also assumes basic Python, JSON, and familiarity with tokens. Here you will turn a document into validated data your program can use.5 min read
14Chapter 14: Common failure modes and API errorsThis chapter assumes you can already send an image or PDF to a chat API, as in the earlier chapters. It also assumes you know what an HTTP status code is and how to catch exceptions in Python. It covers two kinds of failure. The first is requests the API rejects, which you see as errors. The second 6 min read
15Chapter 15: Handling sensitive images and documentsThis chapter assumes you can already send an image or PDF to a multimodal API, as covered earlier in this tutorial. It also assumes basic Python and a general idea of how HTTP requests and API keys work. Here the focus shifts from "does it work" to "what happens to the data once it leaves your machi6 min read
16Chapter 16: Testing your pipelineThis chapter assumes you have read the earlier chapters. You should know how to build an image or PDF request, preprocess inputs, and extract structured data. You should also be able to write basic pytest tests. The goal is to show which parts of a visual input pipeline you can test exactly, and h4 min read