variation • AI Agent SDK
variation: Generate variations of an existing image.
variation
Method
</div>
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
ParamField
strPath or URL to the source image
ParamField
intNumber of variations to generate
ParamField
Optional[str]Output image size **kwargs: Additional provider-specific parameters
Returns
ResponseField
Dict[str, Any]ImageResponse with image variations
Usage
agent = ImageAgent(llm="openai/dall-e-2")
result = agent.variation("original.png", n=3)Uses
litellm.image_variation
Source
View on GitHubpraisonaiagents/agent/image_agent.py at line 326