tools.edit_image module

Edit existing image(s) via native Gemini API and send to the current channel.

Supports multiple input images for compositing, style blending, and multi-reference editing. # 🔥 multi-image witch energy

async tools.edit_image.run(prompt, image_urls=None, image_url=None, aspect_ratio='1:1', ctx=None)[source]

Execute this tool and return the result.

Parameters:
  • prompt (str) – Description of edits or how to combine images.

  • image_urls (list[str] | None) – List of source image URLs.

  • image_url (str | None) – Single source image URL (legacy compat).

  • aspect_ratio (str) – Output aspect ratio.

  • ctx (ToolContext | None) – Tool execution context.

Returns:

JSON result string.

Return type:

str