edit_set
Change how an existing image set, character set or illustration set is delivered, without generating again: its width and height (both, one, or neither, exactly as on the set tools), its canvas when no size is fixed (one canvas for the whole set, or each image wrapped around its own subject), its minimum margin, its sizing (relative or fill), its format and quality, a file size limit per image on webp (maxKB), and for a character set or a transparent image set its background (any color, or transparent). The set is delivered again from its full-resolution source and its download is replaced in place: the same download URL now serves the new delivery, and get_generations reports the new levers. Free; no credits are spent. What the pictures show (the style or character, the subjects, variations or scenes, and the references) cannot be edited - a different picture is a new set.
On an illustration set, width and height go together and must be one of the batch's own sizes: the size its scenes were drawn at (get_generations' nativeWidth and nativeHeight) or an exact half, quarter and so on of it, down to 256 pixels on the shorter side. Format and quality apply as on the other sets; canvas, margin, sizing, background and maxKB do not. At the native size in the model's own format, the originals themselves are delivered.
A lever left out keeps its current value, so one call can change one thing. Any earlier state, the original delivery included, is one edit away: nothing is kept as history because the same levers always produce the same bytes. Editing never extends a set's download window.
jpg has no alpha: asking for jpg on a set delivered transparent composes the images over white unless a background color is in force (given in the same call or kept from an earlier edit); jpg together with background "transparent" is rejected. background applies to character sets and transparent image sets only. Not available for sets generated before editing existed (they have no source).
The user asked for this change to see it: as soon as the call returns, fetch the replaced zip and show them every image exactly as delivered, each as its own file (open the extracted index.html, attach each file as it is, or give the viewer link). Never present a new image made from them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxKB | No | New file size limit for each image, in KB, webp only: each image is encoded under it as on the set tools, its quality and the precision of its transparent edges lowered together only where needed, down to quality 70; a set below 70 keeps its quality and lowers only its edges. An image still over the limit is named in the result. 0 removes the limit. Left out, the current limit stays. | |
| reset | No | true restores every lever to the first delivery's (the set as it was generated), read from the set's own record; any other lever given in the same call is applied on top of that. | |
| width | No | New delivered width in pixels, or 0 to stop fixing the width. Left out, the current width stays. Width and height combine exactly as on the set tools: both fixed is an exact box, one fixed lets the other hug each subject, neither is native size. On an illustration set they go together, as one of its own sizes (see the tool description). | |
| canvas | No | With NEITHER width nor height fixed, what the images land on: uniform (the default) puts the whole set on one canvas, the size it was generated at, every image alike; subject wraps each image around its own subject, so the images differ in size the way the subjects do. Says nothing when a size is fixed. Left out, the current value stays. | |
| format | No | New format: png, webp, or jpg. Left out, the current format stays. jpg has no alpha: on a set delivered transparent it composes the images over white unless a background color is in force (given in the same call or kept from an earlier edit). | |
| height | No | New delivered height in pixels, or 0 to stop fixing the height. Left out, the current height stays. | |
| sizing | No | New sizing: relative keeps the sizes the model gave the subjects in relation to one another (one scale for the set); fill scales each subject on its own to fill the frame less the margin, so every image reads at the same visual weight, at the cost of relative size and of enlarging subjects smaller than the frame (the result reports by how much). Left out, the current sizing stays. | |
| quality | No | New quality (1-100) for webp and jpg; ignored for png. Left out, the current quality stays. | |
| background | No | Character sets and transparent image sets only: a #RRGGBB color composes every image over it and delivers an opaque set; "transparent" delivers the images with their alpha. Left out, the current background stays. Rejected on an image set generated on a color, whose color is in its pixels and cannot change. | |
| generation | Yes | The id of the set to edit - the random segment of its download URL, as list_recent_generations returns it. One batch of a set per call; a set that grew over several calls is edited batch by batch. | |
| minimumMargin | No | New minimum margin in pixels around each subject, with the set tools' bounds. Left out, the current margin stays. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| images | No | ||
| levers | No | The delivery levers now in force: width, height, canvas, minimumMargin, sizing, format, quality, background, and maxKB when a file size limit is set; an illustration set has only width, height, format and quality. | |
| zipURL | No | The set's download, unchanged, now serving the new delivery. | |
| expiresAt | No | ||
| generation | No | ||
| deliveredAt | No | ||
| crispBaseSize | No | The largest base size, in pixels, at which export_set keeps every density of this batch crisp at these levers (for an illustration set, a quarter of the longest side its scenes were drawn at, the largest it exports at); absent when no base size does. |