Replace a registered image
replace_imageReplace an existing image by swapping in a new URL or regenerating it with AI using a prompt and style. Specify the image key to target.
Instructions
Replace the image at key either by: - url: synchronous URL swap (0 credits), or - regenerate: true + prompt: AI regeneration (~40 credits, returns a Job — poll get_job). Exactly one mode must be supplied.
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": {
"key": "<key>"
},
"name": "replace_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Image key to replace, e.g. 'hero.background'. | |
| url | No | New direct URL. Mutually exclusive with regenerate. | |
| style | No | Visual style for AI regeneration, e.g. 'photorealistic'. | |
| prompt | No | Subject / scene description for AI regeneration. | |
| regenerate | No | If true, regenerate the image with AI; requires `prompt`. | |
| aspect_ratio | No | Aspect ratio for AI regeneration. Defaults to 16:9. |