Add reference images
add_reference_imagesAdd stored images to groups as image nodes and connect each one to a node of its group, exactly like dropping the files into the group and connecting them in the app: the image's @# token is appended to the node's text. One call takes up to 25 groups (items), e.g. every shot of a scene with its board crops; each group appears once. Everything is checked before anything is written, then written at once. Default target per group (defaultNodeId in get_group): a shot's panel generator ({ kind: "shot", id }), the starred generator of a shot's production group or the art direction, and for a story element ({ kind: "story_element", id, group }) its reference sheet generator (storyboard, the default group) or its production reference generator (production), whose prompt then cites the images; in a story element's moodboard, its Story element node. nodeId picks another generator or text node of the group; nodes the app would not connect an image to are refused. Name the Story element node ({entityId}-story-element) only to change what every shot citing the element receives: board crops there reach every shot, other shots' boards included. mediaIds come from import_media (pages and crops) or from get_group / view_media. An image already in the group is reused, so calling again does not duplicate it. Returns each image's nodeId and token: cite them in the prompt you write next. wired and connectedToRole say which node the images were connected to (shot_panel, reference_sheet, production_reference, story_element_stage, art_direction, generator, text): report that to the user. The token alone does not tell a generator what to do with the image: when it is a reference the user gave a purpose for, rewrite the prompt with set_prompt in the same run. A shot's boards go in create_shots / update_shot attachments instead, which keep the panel on the app's board template (see the storyboard guide); added here, they make the panel prompt a written one. A model takes a limited number of reference images: the call fails without writing anything when a generator's prompt would cite more. No images are generated and no credits are spent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | One entry per group (max 25), e.g. every shot of a scene with its boards. Each group can appear once. | |
| projectId | Yes | ScreenWeaver project id (from list_projects). |