upload_product_image
Attach an image to an existing product using base64 data or a public URL. Returns the created image record for later management.
Instructions
Attach an image to an existing product. Provide exactly one of
image_base64 (with content_type) or image_url.
Use this after create_product returns a product ID. For replacing
a previously-uploaded image, delete the old one with
delete_product_image first. Marked destructive because subsequent
edits to the image set are visible publicly.
Args:
api_key: Partle API key (prefix pk_).
product_id: ID of the product to attach the image to.
image_base64: Raw image data, base64-encoded. When set,
content_type is required (e.g. image/jpeg).
content_type: MIME type of the base64 payload. Required with
image_base64. One of: image/jpeg, image/png,
image/gif, image/webp.
image_url: URL the server should fetch the image from. Use this
when the image is already hosted somewhere public — saves
base64 overhead.
Returns:
The created ProductImage record with its id (use for deletion)
and storage path.
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": {
"api_key": "<api_key>",
"product_id": "<product_id>"
},
"name": "upload_product_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | ||
| product_id | Yes | ||
| image_base64 | No | ||
| content_type | No | ||
| image_url | No |