> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Image analysis example using CometAPI with vision models

> Stream an image description from a vision model through CometAPI.

```python image_agent.py theme={null}
"""
Image analysis example using CometAPI with vision models.
"""

from agno.agent import Agent
from agno.media import Image
from agno.models.cometapi import CometAPI

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

# Use a vision-capable model from CometAPI
agent = Agent(
    model=CometAPI(id="gpt-5.6-luna"),  # gpt-5.6-luna has vision capabilities
    markdown=True,
)

agent.print_response(
    "Describe this image in detail and tell me what you can see",
    images=[
        Image(
            url="https://httpbin.org/image/png"  # Reliable test image
        )
    ],
    stream=True,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno openai
```

**2. Export environment variables**

```bash Mac/Linux theme={null}
export COMETAPI_KEY="your_cometapi_key_here"
```

```bash Windows theme={null}
$Env:COMETAPI_KEY="your_cometapi_key_here"
```

**3. Run the example**

Save the code above as `image_agent.py`, then run:

```bash theme={null}
python image_agent.py
```

Full source: [cookbook/90\_models/cometapi/image\_agent.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/90_models/cometapi/image_agent.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.