mono/packages/kbot/docs/images.md
2025-09-13 22:18:04 +02:00

39 lines
1.5 KiB
Markdown

# Image Command
The `image` command allows you to create and edit images using Google's Gemini models.
## Description
This tool can be used in two modes:
1. **Image Creation (Text-to-Image)**: Generate an image from a text description.
2. **Image Editing (Image-and-Text-to-Image)**: Modify an existing image based on a text description.
## Usage
### Image Creation
To create an image, provide a text prompt using the `prompt` argument or option. You must also specify an output path with `--dst`.
```bash
kbot image "A futuristic cityscape at sunset" --dst ./cityscape.png
```
### Image Editing
To edit an image, you need to provide the path to the input image using the `--include` (or `-i`) option and a text prompt describing the desired changes.
```bash
kbot image "Make the sky purple" --include ./cityscape.png --dst ./cityscape_purple.png
```
## Options
- `[prompt]`: (Optional) The text prompt for creating or editing an image. Can be provided as a positional argument.
- `--dst <path>`: (Required) The path to save the output image.
- `--include <path>`, `-i <path>`: (Optional) The path to the input image for editing.
- `--model <model_name>`: (Optional) The model to use for image generation. Defaults to `gemini-1.5-flash-image-preview`.
- `--api_key <key>`: (Optional) Your Google GenAI API key. It can also be configured in the kbot config file.
- `--logLevel <level>`: (Optional) Set the logging level.
- `--config <path>`: (Optional) Path to a custom configuration file.