Generate image
generate_imageCreate 1-4 images from a written description: a still, the first frame or a character reference for a video, a thumbnail, an ad image. For a set of different shots, pass up to 4 prompts (one image each) in one call instead of prompt. Returns the finished images in the conversation, usually in 10-40 seconds; if a slow model is still rendering when the wait ends, the reply carries a job_id for check_generation. Spends the workspace's Masonry credits — roughly 5-30 credits per image depending on the model; call list_models for the exact per-model price. For a one-off scene preserving a real product, person or logo, pass reference_image_url (a direct image URL) or product_url (a product page Masonry will pull the real photo from) — without one the model invents a look-alike. To combine several images in one (a person, a product and a setting), pass them all as reference_image_urls. A product photo set (product photography, ad shoots, packshots) from two or more photos of one product is a Studio shoot instead: add_reference_image, then start_product_shoot. With one photo or a product URL, make the shots here with it as the reference. Call list_skills and pass skill_slug when the request matches a Masonry skill. Skill text is guidance; write prompt from the user's request. Omit model for the workspace default; pass style for a look preset.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model key (see list_models). Defaults to the workspace's default image model, or an edit-capable model when a reference is supplied. | |
| style | No | Optional look/style preset, blended into the prompt. One of: photorealistic, cinematic, editorial, film, product, render_3d, anime, watercolor, line_art, vintage. Omit for the model's native look. | |
| prompt | No | Text prompt describing the image to generate. Required unless prompts is given. | |
| prompts | No | Up to 4 different images in one call, one complete self-contained description per image (each describes a single image, not the set). Use instead of prompt; model, aspect_ratio, style and the reference apply to every image. | |
| characters | No | Workspace characters by name (see list_characters). Each one's sheet becomes a reference so the same person, creature or mascot stays the same. Takes the place of reference_image_url. Meant for a character the user named. With skill_slug, a name from that template's cast (read_skill lists it) is added to the workspace on first use, free. | |
| skill_slug | No | Optional Masonry skill slug from list_skills. Uses the selected skill for provenance and model routing only; skill text is guidance, and the prompt describes the user's request. | |
| num_outputs | No | Takes of the same prompt (1-4); every output follows the one prompt, so a prompt that describes several images does not make them. Different looks, angles or scenes go in prompts, one complete description per image. Default 1. | |
| product_url | No | Https product/page URL. Masonry extracts a real product image from the page and uses those pixels as a reference in the generated scene. Provide this OR reference_image_url. | |
| aspect_ratio | No | Optional aspect ratio. Any ratio the chosen model supports (list_models shows each model's ratios), e.g. 4:5, 16:9, 9:16, or an exact WIDTHxHEIGHT on models that accept custom sizes. An unsupported ratio is refused with the model's supported list; nothing is silently substituted. Omit for the model's default size. | |
| reference_image_url | No | Direct https URL (or masonry:// reference from add_reference_image) of a product/person/logo/reference image to preserve in a new generated scene. Provide this OR product_url, not both. | |
| reference_image_urls | No | Several reference images to combine in one new image: direct https image URLs or masonry:// references (masonry://generations/<job_id> for an image made earlier), in the order the prompt cites them. Only models that take more than one reference use them (list_models marks them refs, with their limit); a list longer than the model's limit is refused and nothing is dropped. Use instead of reference_image_url, product_url and characters. |