edit_image: Edit Images

View source: R/image_api.R

edit_imageR Documentation

Edit Images

Description

Edit images using an image editing model.

Usage

edit_image(
  model,
  image,
  prompt = NULL,
  mask = NULL,
  output_dir = tempdir(),
  registry = NULL,
  ...
)

Arguments

model

An ImageModelV1 object or provider:model string.

image

Image source or provider-specific image input.

prompt

Editing instructions.

mask

Optional mask image.

output_dir

Directory where edited images should be written. Defaults to tempdir().

registry

Optional provider registry.

...

Additional arguments passed to the model implementation.

Value

A GenerateImageResult.


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