upscaleImage

public UpscaleImageResponse upscaleImage(String model, Image image, String upscaleFactor, UpscaleImageConfig config)

Upscales an image given a GenAI model and an image and an upscale factor.

Return

a com.google.genai.types.UpscaleImageResponse instance that contains the upscaled image.

Parameters

model

the name of the GenAI model to use for upscaling

image

a com.google.genai.types.Image to send to the generative model

upscaleFactor

the factor to upscale the image

config

a com.google.genai.types.UpscaleImageConfig instance that specifies the optional configurations