A Message whose content is a list of parts carries images, audio clips and files alongside text. Each client translates the parts to its provider’s format (image_url for OpenAI, an image block for Anthropic, inline_data for Google…), so the same message works everywhere the model supports the media.

Images

ImageContent is built from a URL, a local file or raw bytes:

Audio

AudioContent.from_bytes(data, format="wav") takes raw bytes. Audio input works with gpt-4o-audio-preview and Gemini 2.5. Audio produced by a model comes back as response.audio: one AudioContent with the base64 data and, when available, the transcript.

PDFs and files

A FileContent is one of: PDF input works with gpt-4o, Claude and Gemini.

With an agent

An agent accepts the same list of messages as input:
The parts stay in the agent’s history; the context budget counts images, audio and files with conservative estimates.