WooCommerce: Generate and upload image
woocommerce_generate_and_upload_imageGenerate an AI image and upload it to the WordPress media library in one call, with optional attachment to a post or featured image.
Instructions
[UNIFIED] Generate an image with an AI provider (OpenAI DALL-E, Stability, or Replicate Flux) and upload it to the WordPress media library in one call. Optionally attach to a post or set as featured image. Uses the caller's stored provider API key; falls back to server env vars if no per-user key is set.
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": {
"site": "<site>",
"provider": "<provider>",
"prompt": "<prompt>"
},
"name": "woocommerce_generate_and_upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| size | No | 1024x1024 | |
| model | No | ||
| title | No | ||
| prompt | Yes | ||
| caption | No | ||
| quality | No | standard | |
| alt_text | No | ||
| filename | No | ||
| provider | Yes | ||
| convert_to | No | ||
| set_featured | No | ||
| connection_id | No | ||
| skip_optimize | No | ||
| attach_to_post | No | ||
| negative_prompt | No | ||
| input_images_b64 | No | ||
| generate_og_variant | No |