Multimodal I/O

Pass images, audio, video, and files to agents.

Agents can process images, audio, video, and files as input and return generated images or audio. Model support varies by modality.

Setup

Install the SDK for each provider you use:

pip install agno openai google-genai anthropic
export OPENAI_API_KEY="your-openai-api-key"
export GOOGLE_API_KEY="your-google-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"

Each tab is a separate example. Set the key for its provider, replace the example.com URLs with accessible media URLs, and supply the local files shown in the example (photo.jpg, recording.wav, clip.mp4, report.pdf, or question.wav). Supported formats and size limits depend on the selected model.

Media Classes

ClassContent SourcesCommon Metadata
Imageurl, filepath, contentformat, mime_type, detail
Audiourl, filepath, contentformat, mime_type, sample_rate, channels
Videourl, filepath, contentformat, mime_type, duration
Fileurl, filepath, content, externalfilename, format, mime_type

Quickstart

Pass images via URL, file path, or raw bytes:

from agno.agent import Agent
from agno.media import Image
from agno.models.openai import OpenAIResponses

agent = Agent(model=OpenAIResponses(id="gpt-5.2"))

# From URL
agent.run(
    "What's in this image?",
    images=[Image(url="https://example.com/photo.jpg")]
)

# From file
agent.run(
    "Describe this image",
    images=[Image(filepath="./photo.jpg")]
)

# Multiple images
agent.run(
    "Compare these two images",
    images=[
        Image(url="https://example.com/photo1.jpg"),
        Image(url="https://example.com/photo2.jpg")
    ]
)

Learn More

See Multimodal for more examples.