Generate a design image
generate_imageCreate print-ready design images for custom apparel and merchandise, with automatic background handling for isolated artwork and full-scene or pattern designs.
Instructions
Generate a design image (split primitive of design_apparel). The platform decides the background from the prompt and reports it: isolated artwork (a logo, lettering, a character) comes back with its background already removed, while a full scene, poster or all-over pattern is left exactly as written. Read print_ready, background_state and design_intent on the result, and call process_transparency only when the design needs a transparent background and print_ready.applied is not true. Rate-limit errors are classified (model_rate_limited = one model's provider vs platform_rate_limited = this key's ApparelHub throttle vs request_not_sent = the call never reached ApparelHub), and fallback_trail shows any model substitutions. When the platform has advice on the prompt it is returned as prompt_improvement. It is advice with one exception: when the prompt names or depicts the product ("a hoodie with a wolf on it"), the image model is sent improved_prompt instead of your wording, because naming a product makes image models draw the product. The result then has prompt_improvement.applied true and a prompt_rewritten note; pass prompt_improvement "skip" to keep your wording. If its issues include "brand_brief", the prompt describes a whole brand, collection or storefront rather than one design, and improved_prompt is the single strongest design EXTRACTED from it: either generate that one design, or keep the brief and call again with concepts (4 is a good default) to get a themed set from one generation. With concepts > 1 this still returns ONE image; the other designs from the same generation are saved to the workspace and read with get_design_collection(image_uuid).
[#f7097a]
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>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Output shape. 1024x1024 = square; 1024x1792 = tall/portrait (phone cases, posters, banners); 1792x1024 = wide/landscape (mugs, laptop sleeves, wide banners). Pick to match the product's print area — full-bleed goods like phone cases want a tall design that fills the whole area, or the mockup pads/crops it. To re-shape an EXISTING design without spending another generation, use fit_aspect instead. | |
| style | No | ||
| prompt | Yes | ||
| source | No | Explicit model name, or omit to auto-pick (Nano Banana; OpenAI for abstract). | |
| auto_key | No | Leave unset for ordinary work. false sends the prompt exactly as written and removes no background: use it for an all-over or full-bleed design, or when you want the raw image. It also turns off the green-background hint unless augment_prompt_for_transparency is set true. | |
| concepts | No | How many distinct design concepts to ask ONE generation for. Leave unset (1) for ordinary work. Raise it when the prompt is a whole brand or collection brief you want to keep (prompt_improvement reports "brand_brief"): the model is asked for a themed set instead of one image. Capped at 7 (ask for more and you get 7); the model may return fewer. Only sources whose supports_collection is true can do it (Nano Banana today); on any other source, including one the fallback ladder moved to, it is silently reduced to 1 and this tool says so in a warning. Costs ONE image generation either way, because it is one model call; the extra designs cost nothing. Each extra design carries the product name and retail description the model wrote for it. | |
| workspace | No | ||
| no_fallback | No | Disable the model-fallback ladder. By default a rate-limited/transient model transparently retries with a different model (see fallback_trail); set true to fail on the chosen source alone. | |
| prompt_improvement | No | Leave unset (advisory) for ordinary work. "skip" keeps your exact wording when the prompt names or depicts the product; a background instruction may still be added and the background is still removed for isolated artwork. Use it when the wording itself was approved by the user. | |
| augment_prompt_for_transparency | No | Add the solid-green-background hint so the background can be keyed out (default true). |