Edit image
edit_imageEdit an image with a natural language prompt, optionally using a mask for targeted changes, and receive the updated image.
Instructions
Edit an image through a tai-openapi edit model.
Args: prompt: Edit instruction. The field is required; models that ignore it accept "". images: Ordered PNG, JPEG, or WebP inputs as base64 strings or data URLs. size: Optional WIDTHxHEIGHT; only pass it when capabilities input.size is true. model: Optional edit model alias; defaults to TAI_IMAGE_EDIT_MODEL. mask: Optional PNG, JPEG, or WebP mask as base64 or a data URL. Follow the capabilities input.mask policy. response_format: Image response format: "url" or "b64_json". parameters: Model-specific JSON values matching capabilities.parameters_schema.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | Optional PNG, JPEG, or WebP mask encoded as base64 or a data URL. Follow the capabilities input.mask policy. | |
| size | No | Optional WIDTHxHEIGHT. Pass only when capabilities input.size is true. | |
| model | No | Edit model alias; defaults to TAI_IMAGE_EDIT_MODEL. | |
| images | Yes | Ordered PNG, JPEG, or WebP inputs encoded as base64 strings or data URLs. Use get_image_model_capabilities to determine the exact image count. | |
| prompt | Yes | Edit instruction. This field is required; pass "" only for a model whose workflow ignores prompt. | |
| parameters | No | Model-specific JSON values. Must satisfy capabilities.parameters_schema. | |
| response_format | No | url |