generate_image
Starts a local image-generation job from a prompt and model, validates the request immediately, and returns a job ID for polling status.
Instructions
Start one image generation job and return its job_id at once.
The request is validated first, so errors come back immediately. Then call
get_job_status with wait_seconds=45 until the job ends.
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": {
"prompt": "<prompt>",
"model": "<model>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Same seed = same image. | |
| model | Yes | A model id from list_models. | |
| steps | No | Default: model default. | |
| width | No | Pixels. Default: model default, or the shape of the first reference image when reference_images is set and no size is given. | |
| height | No | Pixels. Default: model default. | |
| prompt | Yes | What the image shows, in natural language. | |
| cfg_scale | No | Guidance; 1.0 means no CFG. Default: model default. | |
| output_path | No | PNG path or directory. Default: <project>/generated-images/. | |
| negative_prompt | No | Only for models with supports_negative_prompt. | |
| reference_images | No | Paths of input images (png, jpg, webp, bmp), for models with 'reference' or 'edit'. Relative paths start at the project directory. Describe the change in the prompt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | ||
| job_id | Yes | ||
| settings | Yes | ||
| warnings | Yes | ||
| next_step | Yes | ||
| queue_position | Yes |