Skip to main content
A ready-to-run example is available here!

Sending Images

The LLM you use must support image inputs (llm.vision_is_active() need to be True).
Pass images along with text in the message content:
Works with multimodal LLMs like GPT-4 Vision and Claude with vision capabilities.

Ready-to-run Example

This example is available on GitHub: examples/01_standalone_sdk/17_image_input.py
You can send images to multimodal LLMs for vision-based tasks like screenshot analysis, image processing, and visual QA:
examples/01_standalone_sdk/17_image_input.py
You can run the example code as-is.
The model name should follow the LiteLLM convention: provider/model_name (e.g., anthropic/claude-sonnet-4-5-20250929, openai/gpt-4o). The LLM_API_KEY should be the API key for your chosen provider.
ChatGPT Plus/Pro subscribers: You can use LLM.subscription_login() to authenticate with your ChatGPT account and access Codex models without consuming API credits. See the LLM Subscriptions guide for details.

Next Steps