Skip to main content

variation

Method
This is a method of the ImageAgent class in the image_agent module.
Generate variations of an existing image.

Signature

def variation(image: str, n: int, size: Optional[str]) -> Dict[str, Any]

Parameters

image
str
required
Path or URL to the source image
n
int
default:"1"
Number of variations to generate
size
Optional
Output image size **kwargs: Additional provider-specific parameters

Returns

Returns
Dict[str, Any]
ImageResponse with image variations

Usage

agent = ImageAgent(llm="openai/dall-e-2")
    result = agent.variation("original.png", n=3)