Multimodal input and output
How agents accept images and PDF documents, generate images natively, and keep media in conversation history — with the limits and model requirements.
Agents aren't text-only. The runtime accepts images and PDF documents as input on a message, agents can return files and model-generated images as output, and a conversation's media survives across turns and reloads. In the console this surfaces as chatting with files and images; this page covers the runtime rules underneath.
Media input
A message to an agent can carry file parts alongside its text — images (PNG, JPEG, GIF, WebP) and PDFs, sent inline with the message. Two rules shape the experience:
- Rejected loudly, never dropped. Media the agent's model can't consume — or that exceeds a limit — fails the request with an error naming the part and the reason. An agent never silently ignores your attachment and answers anyway.
- Capability follows the model. Image input needs a vision-capable model (modern OpenAI, Anthropic Claude 3+, and Google Gemini models). PDF input works on Anthropic and Gemini models; on OpenAI models it works only when the agent's provider is the OpenAI Responses variant — the plain OpenAI chat provider has no document input, so a PDF there is rejected. See model capabilities.
Input limits
The runtime enforces hard bounds at ingest, before anything reaches the model:
| Bound | Limit |
|---|---|
| Per-image size | 5 MiB (and sane pixel dimensions) |
| Images per message | 20 |
| Per-PDF size | 32 MiB |
| PDFs per message | 5 |
Console chat applies its own tighter envelope on top — about 5 MiB per file and 15 MiB per turn across all attachments — so an upload that is too large fails in the composer with a clear message.
A rejected part is recorded as an input_media_rejected
audit event. One caveat worth
knowing: media bytes aren't text, so guardrail and intent scanning apply
to the message's text parts — not inside an image or document.
Media output
An agent's reply can carry files the same way: outputs of file-producing tools (a generated report, a screenshot), and — when the agent has Generate images enabled — images the model produced directly from the prompt.
Native image generation is a model capability, not a skill or tool you
install: it is offered only where the provider supports it (the OpenAI
Responses variant, or Google Gemini with an image model) and is off by
default. Each generated image is also recorded as a generated_media
audit event carrying the image's content fingerprint, so image output is
visible in the audit trail — not just as token counts on the model call.
Media in history
Conversation history stores media by reference, with the bytes kept in content-addressed storage — so sessions stay small no matter how many images flow through them, and reopening a past execution in the console re-renders its images and documents rather than showing bare text. Media an agent produced mid-conversation is re-presented to the model on later turns, so "make the logo from before blue" works across turns.
Images produced during a streamed turn render live but are not yet persisted into execution history — see sync and streamed turns.
Full runtime detail — the exact wire shape, per-format rules, and reject reasons — lives in the developer section: Multimodal I/O.