| ImageModelV1 | R Documentation |
Abstract interface for image generation and editing models.
specification_versionThe version of this specification.
providerThe provider identifier.
model_idThe model identifier.
capabilitiesModel capability flags.
new()Initialize the image model.
ImageModelV1$new(provider, model_id, capabilities = list())
providerProvider name.
model_idModel ID.
capabilitiesOptional list of capability flags.
has_capability()Check if the image model has a specific capability.
ImageModelV1$has_capability(cap)
capCapability name.
Logical.
generate_image()Public image generation method.
ImageModelV1$generate_image(...)
...Call options passed to do_generate_image().
A GenerateImageResult object.
edit_image()Public image editing method.
ImageModelV1$edit_image(...)
...Call options passed to do_edit_image().
A GenerateImageResult object.
do_generate_image()Generate images. Abstract method.
ImageModelV1$do_generate_image(params)
paramsA list of call options.
A GenerateImageResult object.
do_edit_image()Edit images. Abstract method.
ImageModelV1$do_edit_image(params)
paramsA list of call options.
A GenerateImageResult object.
do_stream_image()Stream image generation with partial-image previews.
Optional — subclasses that support it override. Default raises an
informative error so stream_image() callers can fall back to
generate_image() on providers without streaming support.
ImageModelV1$do_stream_image(params, callback)
paramsA list of call options.
callbackA function called with each event list.
A GenerateImageResult object with the final image.
stream_image()Public image streaming method.
ImageModelV1$stream_image(callback, ...)
callbackA function receiving each event list.
...Call options passed to do_stream_image().
A GenerateImageResult object.
clone()The objects of this class are cloneable with this method.
ImageModelV1$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.