Class Images

java.lang.Object
uno.anahata.ai.tools.spi.Images

public class Images extends Object
A tool provider for generating images using the Gemini API.

This class leverages the gemini-2.5-flash-image model to create visual content based on text prompts.

  • Constructor Details

    • Images

      public Images()
  • Method Details

    • create

      public static String create(String prompt, String filePath) throws Exception
      Generates a single image from a text prompt and saves it to the local file system.
      Parameters:
      prompt - A detailed description of the image to generate.
      filePath - The absolute path where the resulting PNG image should be saved.
      Returns:
      A success or failure message.
      Throws:
      Exception - if the API call fails or an I/O error occurs.