Multimodal LLMs for Developers: Images, PDFs, Screenshots and Audio
Use multimodal models to read images, screenshots, PDFs and charts: practical use cases, prompting, token costs, accuracy limits and privacy.
Published December 1, 2026
Modern models do not just read text. Multimodal models accept images (and often PDFs and audio) alongside text, which unlocks features that used to need specialised pipelines: extracting fields from invoices and receipts, describing screenshots in bug reports, reading charts, converting whiteboard photos into diagrams, and answering questions about scanned documents.
The concept
Images are converted into tokens by the model's vision encoder, so they consume context and cost like text; larger, higher-resolution images cost more. Many APIs resize images automatically within limits. PDFs may be processed as extracted text plus page images, which helps with tables, layouts and charts that plain text extraction mangles.
Accuracy is good but not perfect. Models can misread small text, dense tables, handwriting and numbers in low-quality scans, and can confidently invent details that are not in the image. For high-stakes extraction, combine structured output schemas, validation (totals add up, dates are valid), and human review for low-confidence cases.
Practical use cases
| Use case | Approach | Validation |
|---|---|---|
| Invoice / receipt extraction | Image + JSON schema | Sum line items; check tax maths |
| Bug report screenshots | Describe UI state, error text | Link to logs when possible |
| Charts and dashboards | Ask for data points and trends | Spot-check against source data |
| Scanned contracts | PDF pages + targeted questions | Quote the exact clause |
| UI to code | Screenshot → HTML/CSS draft | Visual diff, accessibility checks |
How it works
Images cost tokens
Practical examples
Send an image with a question
Base64 or URL inputs, depending on the API.
import base64
img = base64.b64encode(open("receipt.jpg", "rb").read()).decode()
response = client.messages.create(model=MODEL, max_tokens=800, messages=[{
"role": "user",
"content": [
{"type": "image", "source": {"type": "base64", "media_type": "image/jpeg", "data": img}},
{"type": "text", "text": "Extract merchant, date, line items and total as JSON."},
]}])Validate extracted totals
Catch misreads with simple maths.
items_total = sum(i["amount_paise"] for i in data["items"])
if abs(items_total + data["tax_paise"] - data["total_paise"]) > 100:
flag_for_review(data)Reduce cost by cropping and resizing
Send only the region that matters.
from PIL import Image
im = Image.open("screenshot.png").crop((0, 0, 1280, 400)) # error banner region
im.thumbnail((1280, 1280)); im.save("crop.png")Common mistakes
- Sending huge uncropped images and paying for unnecessary tokens.
- Trusting extracted numbers without validation.
- Uploading images containing personal data without considering privacy terms.
- Expecting perfect handwriting or tiny-font recognition.
Key takeaways
- Multimodal models read images, screenshots and PDFs.
- Images consume tokens; crop and resize to control cost.
- Use schemas and validation for extraction tasks.
- Keep humans in the loop for low-confidence, high-stakes cases.
FAQ
Is OCR still needed?
For high-volume, simple text extraction, dedicated OCR can be cheaper; multimodal models excel when layout understanding and reasoning are needed.
Can models generate images too?
Some models and APIs generate images; that is a separate capability from image understanding.
How do I handle multi-page PDFs?
Send relevant pages only, or process pages in parallel and combine results.