Generate image
generate_imageGenerate an image from a text prompt. Inputs: workspace_key and prompt (subject, style, composition); optional model (nano_banana, nano_banana_2, gpt_image, or seedream; default is the workspace's model), aspect_ratio (for example "1:1", "9:16", "16:9"; default square), apply_visual_style (adds the workspace's brand visual style to the prompt), and reference_image_urls (up to 6 public image URLs, for example from search_media or an earlier result, to keep a subject, product, or person).
Generation runs in the background and usually takes 1-5 minutes. The tool returns a request id at once; call get_generated_image with it every 15-30 seconds until it is done. The image is not added to the media library. Its URL can be used in compose_design, set_design_background, or replace_design_image.
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": {
"workspace_key": "<workspace_key>",
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional image model. Omit to use the workspace default. | |
| prompt | Yes | What the image should depict — subject, style, composition. Required. | |
| aspect_ratio | No | Optional aspect ratio, e.g. "1:1", "9:16", "16:9". Defaults to square. | |
| workspace_key | Yes | Key of the workspace to act in. Call list_workspaces to see the workspaces you have access to and their keys. | |
| apply_visual_style | No | Optional. Layer the workspace's brand visual style onto the prompt. Defaults to false. | |
| reference_image_urls | No | Optional public image URLs for image-to-image. Up to 6. |