UserModelMessage that the agent loop passes directly to the model. On the output side, tools can return BinaryContent (raw bytes with a MIME type) that flows back to the model as part of the conversation.
Content type routing
Images
image parameter accepts a URL string, a base64-encoded string, or raw bytes. The optional text parameter adds a text prompt alongside the image. mediaType is optional — when omitted, no MIME type hint is sent and the provider infers the format from the content.
When passing a base64 string, include only the encoded payload - not the
data:image/jpeg;base64, prefix. Vibes sends the data part directly to the model provider.Audio
imageMessage, the mediaType argument is required for audio - the runtime has no way to infer the codec from raw bytes.
Video
Video follows the same shape as audio: usefileMessage with a video/* MIME type. Provider support varies.
Documents
UsefileMessage to send PDFs, plain text, or other document formats alongside a prompt.
UploadedFile
When a provider has already stored a file server-side (for example, via the Anthropic Files API), you reference it with anUploadedFile object rather than re-uploading the bytes.
uploadedFileSchema when an agent tool needs to accept an UploadedFile as a parameter:
Binary content from tools
Tools can returnBinaryContent - raw bytes with a MIME type - which the agent loop forwards to the model as part of the next turn. This lets a tool produce an image, audio clip, or document that the model can reason about.
Tool multi-modal return flow
To learn how tools integrate with the broader agent loop and how to compose toolsets, see Tools.