Generate an image from references
generate_with_refsGenerate images from prior creations using face-ref, character-ref, style-transfer, or smart-edit. Preserve identity or style, edit an image, spend credit, and get the result or a queueId.
Instructions
Generate an image conditioned on existing creations. This SPENDS the account's credit. Four tools: "face-ref" keeps a face identity across new scenes (1-6 refs), "character-ref" keeps a whole character consistent (1-6 refs), "style-transfer" extracts the STYLE of the refs (1-3) and applies it to the prompt, "smart-edit" EDITS refs[0] following the prompt as the edit instruction (up to 3 extra support refs, 4 total). Reference ids come from earlier generations, upload_image or list_creations. Returns the finished creation within the wait budget, else a queueId for check_generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | Which reference tool to run. | |
| wait | No | Block until ready (default true). Set false to get a queueId immediately. | |
| prompt | No | The scene to generate. Optional for style-transfer (the refs carry the style). For smart-edit this is the edit instruction and is required. | |
| quality | No | Quality preset id, or "auto" (default) to pick by tier. | |
| allowNSFW | No | Permit adult content, if the account allows it. | |
| aspectRatio | No | Shape of the output. Defaults to 1:1. | |
| refCreationIds | Yes | Creation ids to condition on. face/character-ref: 1-6 identity shots. style-transfer: 1-3 style sources. smart-edit: refs[0] = the image to EDIT, plus up to 3 support refs. | |
| extractionDirective | No | style-transfer only — what to extract from the refs (default "style"). |