Send the image with the model call
The examples below all calllangwatch.setup(). The OpenAI and Anthropic ones run inside a @langwatch.trace() entry point; the Google ADK one lets the instrumentor make the trace. Read Integration Guide first if you have not set that up yet.
OpenAI
Put the image in animage_url part, as a data URL.
Anthropic
Put the image in animage content block with a base64 source.
{"type": "url", "url": "https://..."}, is understood too.
Google Gemini and Vertex
Put the image in an inline data part.Part.from_bytes builds one for you. The rest of the agent setup does not change.
The instrumentor makes the trace for this call, so no
@langwatch.trace()
wrapper is needed. If you add one to attach metadata, switch the run to
Runner.run_async: the synchronous Runner.run starts its own thread, which
begins with an empty OpenTelemetry context, and the agent spans open a second
trace. See the Google ADK integration.Image shapes LangWatch understands
Send any of these and the picture is captured. The list covers the shapes the major providers and agent frameworks produce.
Always set the media type. Without one, LangWatch leaves the bytes inline in the trace instead of storing them, because it cannot serve them back as a picture.
What happens to the bytes
LangWatch moves the image out of the span at ingestion. The bytes go into content-addressed object storage and the message part becomes a/api/files/<projectId>/<id> reference, around 60 characters where the base64 was.
Storage is addressed by SHA-256, so identical bytes are stored once. For example, the same picture sent on ten traces costs one stored object.
On read, LangWatch serves the original media type for images, audio, video and PDF files. Anything else is served as a download.
Where the image appears
The trace list draws a thumbnail next to the input preview, so you can spot a run with a picture without opening it.
Trace list rows showing image thumbnails next to the input text, and a paperclip on the row whose attachment is a document

The trace drawer Summary tab, with the captured picture rendered inline below the input text and the model answer below it
Related
- Capturing Documents, for PDF files and other attachments
- Capturing Audio and Voice, for recordings and voice agents
- Multimodal Evaluation, to score image inputs and outputs with a vision model
- View images in datasets, to hold images in a dataset column