Add an image to a Pro draft
upload_pro_imageStore an image (PNG, JPEG, WebP or SVG) in a Pro draft and get its src for an image layer ({"op":"set","layer":"hero","props":{"src":""}}). Send small images as data (base64 or a data URL, up to 3 MB); for a file on disk, leave data out and the answer is the curl command that uploads it.
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": {
"draftId": "<draftId>",
"editToken": "<editToken>"
},
"name": "upload_pro_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The image as base64 or a data URL. | |
| file | No | Without data: the file's path, to write it into the curl command. | |
| draftId | Yes | The draft's id (draftId). | |
| editToken | Yes | The editToken the draft came with. | |
| contentType | No | Its type, when data is plain base64. |