generate_gemini_image
Generate or edit images from text prompts and optional reference images, saving results to your project. Uses Gemini image models via chat completions.
Instructions
Generate or edit images with POST /v1/chat/completions using a Gemini image model. Do not call /v1/images/* for Gemini image models.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Configured model to start with. Defaults to the first model configured for this tool. | |
| images | No | Optional local image paths sent as user content image_url data URLs (max 16). | |
| prompt | Yes | Text prompt | |
| filename | No | Optional AI-chosen basename (Unicode allowed, up to 200 UTF-8 bytes, optional extension). Requires output_path to be a directory. Existing names get numbered suffixes instead of being overwritten. Unsafe names are rejected before generation, not rewritten. | |
| output_path | Yes | File or directory to write. Relative paths resolve against process.cwd(). | |
| aspect_ratio | No | Optional image_config.aspect_ratio | |
| auto_fallback | No | Try the next configured model after an upstream failure. Overrides GEN_IMAGE_AUTO_FALLBACK. |