transform_image
Apply a text prompt to transform an existing image—change style, add elements, or adjust colors—and save the edited result.
Instructions
Transform an existing image based on a text prompt.
Args: image_path: Path to the source image to transform. Supports common formats (PNG, JPEG, etc.) prompt: Text description of the desired transformation. Examples: "Make it black and white", "Add a rainbow in the sky", "Convert to watercolor painting style" model_id: Model identifier from list_models(). Examples: "amazon.nova-canvas-v1:0", "gpt-image-1.5", "models/gemini-2.5-flash-image" output_path: File path where the transformed image will be saved. Parent directories are created automatically.
Returns: Success message with output path, or error description.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_path": "<image_path>",
"prompt": "<prompt>",
"model_id": "<model_id>",
"output_path": "<output_path>"
},
"name": "transform_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| model_id | Yes | ||
| image_path | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |