content_image: Create Image Content

View source: R/multimodal.R

content_imageR Documentation

Create Image Content

Description

Creates an image content object for a multimodal message. Automatically handles URLs, data URIs, raw bytes, and local files. This is kept for backward compatibility and returns the provider-neutral image block used by multimodal providers.

Usage

content_image(image_path, media_type = "auto", detail = "auto")

Arguments

image_path

Path to a local file or a URL.

media_type

MIME type of the image (e.g., "image/jpeg", "image/png"). If NULL, attempts to guess from the file extension.

detail

Image detail suitable for some models (e.g., "auto", "low", "high").

Value

A provider-neutral image block.


aisdk documentation built on May 29, 2026, 9:07 a.m.