Generate an image for a site
generate_imageMakes one image with an image model, checks it for lettering and faces, and adds it to the site's media library, then returns its attachment_id, the change_set_id, the site's state_version, and the alt text. Call it only when your user wants a new picture and has no photo to give you. Describe a scene, tools, or finished work in prompt, in English; the image shows no lettering, logos, or faces. Write the alt text yourself. It makes one attempt: if the check fails, it returns an error, nothing is added, and the cost of that image is charged, so change the prompt before you try again. It does not put the image on a page: call apply_change_set afterwards with the attachment_id as a number. It costs 90 agent credits and counts as one of 10 paid calls a minute, and it can take up to 115 seconds. Send an idempotencyKey and send the same one on a retry, so a retry after a timeout returns the image and does not charge twice. No check runs on the alt text, so your user owns the wording. rollback_change_set undoes 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": {
"siteId": "<siteId>",
"prompt": "<prompt>",
"alt": "<alt>",
"placement": "<placement>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | Yes | One sentence in the site's language that says what the picture shows. | |
| prompt | Yes | What the picture shows, in English: objects, setting, light. No people, text, logos, or web addresses. | |
| siteId | Yes | Site id from list_sites or create_site. | |
| placement | Yes | Where it will go: hero, service, area, gallery, or about. | |
| idempotencyKey | No | New for each image; send the same one when you retry. |