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

InputTypeRequiredNotes
promptstringyesWhat 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"noMatch the shape of the slide the image is for. default "4:5"
creatorIdstringnoA saved creator from list_creators; keeps that face. up to 200 characters
referencesobject[]noImages to show, such as the user's app screenshot. up to 2 items
maxCreditsintegeryesMost 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

FieldTypeNotes
imageIdstringThe new image's id.
imageobjectThe image object: put it in a slide's image slot as is.
widthnumberWidth in pixels.
heightnumberHeight in pixels.
creditsChargednumberCredits 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.

Something wrong or missing? Write to support@wavegrain.com.