Design Generation
td_design_generationGenerate new textile designs from a source image and a written prompt, re-imagine an image with textures or color palettes, or repaint masked areas; results are saved to disk.
Instructions
Design Generation: generate a new design from the source image plus a prompt (text_to_image, recommended), re-imagine it with a texture / colour palette (image_to_image), or repaint a masked area (inpaint). The website's Mood Board is not available here. Best for: creating a new design from your image plus a written prompt. Result files are saved to disk and their paths returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Mode: text_to_image (Image+Text to Image, Recommended): Generates a new design from the source image plus a prompt. prompt is required. image_to_image (Image to Image): Re-imagines the source image with a texture (fabric / surface treatment) and a colour palette; no prompt. inpaint (Inpaint): Repaints only the masked area of the source image from a prompt. Needs mask_image (same size as the image; white = area to change, black = keep) and prompt. Required: pass the mode the user named. If the user did not name one, omit it and the tool returns the modes to show them; never choose for the user. | |
| wait | No | Wait for the job and save the outputs (default true). false returns the task_id right after submit. | |
| image | Yes | Source image: a local file path or an http(s) URL. PNG, JPEG or WebP, up to 80 MB and 5000 px per side. | |
| prompt | No | Prompt (text_to_image, inpaint): describe the design to generate, or what to paint in the masked area (required in those modes). | |
| texture | No | Texture Type: none (None, Recommended), smooth (Smooth), rough (Rough), linen (Linen), corduroy (Corduroy), silky (Silky), metallic (Metallic), matte (Matte), glossy (Glossy), woven (Woven), knitted (Knitted), leather (Leather), velvet (Velvet), denim (Denim), embroidery (Embroidery). Required: pass the mode the user named. If the user did not name one, omit it and the tool returns the modes to show them; never choose for the user. image_to_image only. Call describe_tool for what each option does. | |
| mask_image | No | inpaint: the mask (path or URL), the same size as the image; white = area to change, black = keep. | |
| output_dir | No | Folder to save results in. Default: the folder of the input image (or the current directory for URL inputs). Files are never overwritten. | |
| aspect_ratio | No | Aspect Ratio: same_as_input (Same as input image, Recommended): Matches the source image: square (1:1), landscape (4:3) or portrait (3:4). 1:1 (1:1): Square output. 4:3 (4:3): Landscape output. 3:4 (3:4): Portrait output. Required: pass the mode the user named. If the user did not name one, omit it and the tool returns the modes to show them; never choose for the user. text_to_image only. | |
| color_palette | No | Color Palette: none (None, Recommended), Sunset Glow (Sunset Glow), Ocean Breeze (Ocean Breeze), Forest Mist (Forest Mist), Lavender Dreams (Lavender Dreams), Citrus Burst (Citrus Burst), Rainbow Splash (Rainbow Splash), Cotton Candy (Cotton Candy), Deep Ocean (Deep Ocean). Required: pass the mode the user named. If the user did not name one, omit it and the tool returns the modes to show them; never choose for the user. image_to_image only. Call describe_tool for what each option does. | |
| estimate_only | No | Only return the credit estimate; nothing is uploaded or charged. | |
| palette_colors | No | image_to_image: up to 20 hex colours used as the palette instead of a named color_palette. | |
| review_settings | No | Omit it and the tool first asks whether to use the recommended settings or adjust them (unless the call already sets some). true: ask each setting one by one. false: run with the given or recommended settings without asking; pass it only after the user chose that. | |
| timeout_seconds | No | How long to wait for the job before returning its task_id (default 240). | |
| unlimited_bundle | No | Request the Unlimited bundle for this run (only has effect on Unlimited plans; the server decides). |