generate_image
Make an AI image with Wavegrain's MCP server: the generate_image tool needs the generate permission. Inputs, outputs and an example call.
Make an AI image. Permission: generate. Changes saved work.
Make one AI picture from a prompt at one slide shape, saved to the user's images; a creator keeps that face, references show things such as the user's app. It changes no slide: put its image in a slot. 1 credit, 4 with a creator or references, refunded if it fails; say so first.
Inputs
| Input | Type | Required | Notes |
|---|---|---|---|
prompt | string | yes | What the image shows. With a creator or references, say what each input image is, in order. up to 1500 characters |
aspect | "1:1" | "4:5" | "3:4" | "9:16" | no | Match the shape of the slide the image is for. default "4:5" |
creatorId | string | no | A saved creator from list_creators; keeps that face. up to 200 characters |
references | object[] | no | Images to show, such as the user's app screenshot. up to 2 items |
maxCredits | integer | yes | Most credits this call may spend; refused, spending nothing, if it could cost more. 0 to 1000 |
The fields inside an object or a list are in the JSON Schema at /developers/mcp-tools.json.
Returns
| Field | Type | Notes |
|---|---|---|
imageId | string | The new image's id. |
image | object | The image object: put it in a slide's image slot as is. |
width | number | Width in pixels. |
height | number | Height in pixels. |
creditsCharged | number | Credits this call spent. |
Example call
Send it to POST https://wavegrain.com/api/mcp with an access key that has the generate permission; Authentication shows how to make one.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "generate_image",
"arguments": {
"prompt": "<prompt>",
"maxCredits": 1
}
}
}
The call shows only the required inputs, with placeholder values: put your own in.
Related tools
copy_post: Copy a postcreate_tailored_slideshow: Make a tailored slideshowremove_background: Cut out a photogenerate_slideshow: Make a slideshowcreate_brand_from_website: Make a brand from a websiteresume_automation: Resume an automation- All 79 tools
Something wrong or missing? Write to support@wavegrain.com.