Multimodal AI models: combining text, image and audio
What Claude, OpenAI and Gemini APIs accept as images, PDFs, audio and video, how media is billed as tokens, open vision models and their licences.
A multimodal model reads more than one kind of input in a single request: text together with a photo, a scanned PDF, a sound recording or a video clip. For a developer, the useful questions are concrete. Which file types does each API take? How does a picture or a minute of audio turn into billable tokens? What do the vendors themselves say the models get wrong? This guide answers those from the official documentation of Anthropic, OpenAI and Google, three open-weight model cards, and two research papers. All sizes and limits below are as the vendors publish them in November 2026; check the linked pages before you build, because they change often.
How models join images and text
Two papers explain most of what today’s APIs do under the hood.
CLIP (Radford et al., 2021) learned image representations from 400 million image and caption pairs gathered from the web. The training task was simple: work out which caption belongs to which picture. Earlier vision systems were trained on a fixed list of categories; after CLIP’s training, plain language can name visual concepts, including new ones, so the model transfers zero-shot to tasks it was never given labelled data for.
LLaVA (Liu et al., 2023) took the next step. It wires a vision encoder into a large language model and trains the whole thing end to end, using image instruction data that the authors produced with text-only GPT-4. The result is a general assistant that answers questions about pictures in conversation. The authors released their data, model and code.
Shipping models follow the same pattern. Meta’s card says Llama 3.2-Vision sits on the Llama 3.1 text model and adds a separately trained vision adapter. Qwen’s card for Qwen2.5-VL describes a ViT image encoder reworked with SwiGLU and RMSNorm so it matches the Qwen2.5 language model. In the hosted APIs, you see this design as “image tokens”, priced like text tokens.
Image limits at a glance
| Claude API | OpenAI API | Gemini API | |
|---|---|---|---|
| Formats | JPEG, PNG, GIF, WebP | PNG, JPEG, WEBP, non-animated GIF | PNG, JPEG, WEBP, HEIC, HEIF |
| How to send | base64, URL, or Files API file_id | full URL or base64 data URL | URL, inline base64, or File API |
| Images per request | 100 (200k-context models) or 600 | multiple, each billed | up to 3,600 files |
| Token unit | 28x28 px patch | 32px patch (some models) or 512px tiles | 258 tokens per image or 768x768 tile |
Anthropic Claude: images and PDFs
The Claude vision guide lists the per-image ceilings: 8000x8000 pixels and 10 MB base64-encoded on the Claude API (5 MB on Amazon Bedrock), with a 128 MB cap on the whole first-party request. Once a request carries more than 20 images, a tighter size limit applies to every one of them. Animated files are accepted, but only the first frame is read. Anthropic also notes that Claude does best when images appear before the question.
Cost is easy to estimate. Each 28x28 block counts as one visual token, so an image costs ⌈width/28⌉ × ⌈height/28⌉ tokens. Two tiers cap that number. On most models the long edge is limited to 1,568 px and 1,568 tokens; Claude 4.7 and later models allow 2,576 px and 4,784 tokens. A 1000x1000 picture costs 1,296 tokens on either tier. Bigger images are scaled down with their aspect ratio kept, which can make small text unreadable, so crop or resize yourself when detail matters.
PDF support uses the same vision pipeline. Each page is rendered to an image, and the page’s extracted text is passed alongside it, so Claude can read charts and tables as well as prose. A request can hold up to 600 pages (100 when the context window is below 1M tokens), and password-protected or encrypted files are not supported. Expect roughly 1,500 to 3,000 text tokens per page plus the image cost. Word and Excel files cannot go in document blocks; convert them to PDF or text first.
Anthropic’s stated limits: Claude refuses to name people in images, may misread blurry or rotated pictures and anything smaller than 200 pixels, gives only approximate counts and coordinates, cannot tell whether an image is AI-generated, and is not built to interpret CT or MRI scans.
OpenAI: vision, image output and voice
The OpenAI images and vision guide covers both directions. For analysis, you attach an image by URL or base64 data URL, and you may add several images to one content array, keeping in mind each is billed as tokens. A detail setting controls preprocessing, with low, high, original and auto available depending on the model; the default is auto. OpenAI suggests original, where supported, for OCR, small objects and computer use.
On patch-based models, the API covers the resized image in 32px squares, applies a per-model multiplier, and bills the result as input tokens. Any image that still needs more than 30,000 patches is rejected outright rather than shrunk. For output, GPT Image models generate or edit pictures, either through the Images API or as an image generation tool inside the Responses API.
Audio is handled by separate products. The audio guide points new conversational voice apps to GPT-Live, and keeps dedicated APIs for transcription, translation and speech generation. The Realtime API runs a speech-to-speech agent that works on audio directly, tracks the conversation and calls tools, connecting over WebRTC in a browser or WebSocket on a server.
OpenAI’s documented weak spots: specialised medical images such as CT scans, text in non-Latin scripts like Japanese or Korean, rotated or upside-down content, precise spatial tasks such as reading chess positions, panoramic and fisheye shots, and object counts. The model never sees file names or metadata, and CAPTCHA submissions are blocked.
Google Gemini: images, audio, video and documents
Google documents separate guides for images, audio, video and documents. In the image guide, small images (both sides 384 px or less) cost 258 tokens, and larger ones are cut into 768x768 tiles at 258 tokens each. From Gemini 3, a media_resolution parameter sets the most tokens any image or video frame may use: higher values help with fine print but cost more and add latency. Gemini 2.5 and later can return segmentation masks as well as bounding boxes.
Audio goes inline when the whole request stays under 20 MB, or through the Files API above that. Formats include WAV, MP3, AIFF, AAC, OGG, FLAC, M4A and WebM. Each second costs 32 tokens (1,920 a minute), one prompt can carry up to 9.5 hours, audio is downsampled to 16 Kbps, and multiple channels are merged into one. Google says the model also picks up non-speech sounds such as birdsong or sirens.
Video accepts MP4, MOV, AVI, WebM and other common types, plus YouTube URLs (free-tier users are capped at 8 hours of YouTube video a day). By default the model samples one frame per second, so very fast action can be missed. In this static mode each frame costs 258 tokens, or 66 at low media resolution, and the soundtrack adds 32 tokens a second. Models with a 1M context window handle around 3 hours of video at low resolution or 1 hour at high. Gemini 3.5 Flash Lite, 3.6 Flash, 3.8 Flash and Gemini 4 Argon also offer an agentic mode that jumps around long videos and loads only the parts the prompt needs.
For documents, Gemini reads PDFs up to 50MB or 1000 pages, at 258 tokens per page. Pages are scaled to between 768x768 and 3072x3072 pixels. Word, PowerPoint and Excel files can be sent in a document block too, while TXT, Markdown and HTML are read as plain text, losing charts and layout.
Open-weight vision-language models
If you need to run a model on your own hardware, these three cards describe image input clearly. For the wider landscape, see our post on open-source LLMs.
| Model (Hugging Face ID) | Input and output | Licence | Notes from the card |
|---|---|---|---|
| Qwen/Qwen2.5-VL-7B-Instruct | images and video in, text out | Apache 2.0 | Handles video over an hour long; returns boxes or points as JSON; structured output from invoices and forms; min_pixels/max_pixels trade quality for cost |
| meta-llama/Llama-3.2-11B-Vision-Instruct | text and images in, text out (11B and 90B sizes) | Llama 3.2 Community License | English is the only supported language for image plus text; EU-based individuals and companies do not get the licence’s usage rights for the multimodal models (end users of products built on them are exempt) |
| google/gemma-3-4b-it | text and images in, text out | Gemma terms of use (gated download) | Images normalised to 896x896 and encoded to 256 tokens; 128K context for 4B, 12B and 27B, 32K for 1B |
To serve one of these locally, look at tools in our LLM infrastructure category.
A minimal image and text request
This is Anthropic’s own URL-based example from the vision guide. The image block comes first, followed by the question:
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
messages=[
{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "url",
"url": "https://platform.claude.com/docs/images/vision-example.jpg",
},
},
{"type": "text", "text": "Describe this image."},
],
}
],
)
print(message)
OpenAI’s Chat Completions example uses the same shape: a content array that mixes a text part with an image part.
Practical habits
- Resize before you send. Every vendor above downscales large media, and token cost grows with resolution. Pick the smallest size where your text is still legible.
- Upload once, reference many times. Anthropic and Google both offer a Files API. In multi-turn chats, resending base64 images on every turn inflates each request.
- Keep media budgets inside the context window. Long video and audio eat tokens quickly; our guide to context window optimisation covers ways to trim.
- Verify counts and coordinates. Both Anthropic and OpenAI list counting and spatial precision as weak points, so check outputs before acting on them.
- Choose the right audio path. Recorded files suit transcription or Gemini audio input; live conversation suits a realtime voice API. Our voice, video and media category lists related tools.
Written by AI Agents Directory
Editorial team
Facts in this guide are checked against official documentation and repositories, which are linked in the article.