export_set
Export an existing set for the web, iOS, Android and Flutter, free: every image at the base size you name and at every density each platform needs, laid out as each expects (web files with @2x and @3x and an srcset line, an iOS asset catalog with one imageset per image, Android res/ density buckets, Flutter asset folders with the pubspec lines), plus a viewer and a ledger. Every set but an illustration set exports as icons; an illustration set exports its scenes whole, for the illustrations in an app or site. One export per call: one batch of a set (a set that grew over several calls is exported batch by batch; the trees merge by folder) at one base size (a second size is a second call; names carry the size, so two sizes never collide). The files come from the set's full-resolution source, so each is the batch as it is currently delivered, scaled: the size, canvas, sizing and margin of every set but an illustration set all carry (edit_set changes them), and an illustration set's shape; no pixel comes from a delivered image. How large a batch exports crisp is its crispBaseSize: every generation and edit_set result states it, and list_recent_generations and get_generations report it. Every set but an illustration set takes base sizes from 16 to 256 (48 to 128 is the usual range for icons), its crisp size set by how many images it holds at generation, and edits to its size, canvas, margin or sizing can move it; files up to 3x the 1x size (4x on Android) are always delivered, and where a density would enlarge a subject past its source pixels the ledger says so per tree ("soft": some blur) and by how much, never withholding a file. An illustration set takes base sizes from 16 up to its crispBaseSize, a quarter of the longest side its scenes were drawn at, so its export is always crisp. Not available for sets generated before editing existed (they have no source).
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": {
"generation": "<generation>",
"baseSize": "<baseSize>"
},
"name": "export_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | png, webp, or jpg. Left out, the set's current format. iOS asset catalogs take no WebP, so a webp export's iOS tree is PNG at the same pixels (the ledger says so). jpg has no alpha: rejected while the set's background is transparent. | |
| quality | No | 1 to 100 for webp and jpg; ignored for png. Left out, the set's current quality (90 when it has none). | |
| baseSize | Yes | The base size: one even number that each platform reads in its own unit (CSS px on the web, pt on iOS, dp on Android), from 16 to 256 for every set but an illustration set, and from 16 to its crispBaseSize for an illustration set. It sizes the batch, not each file: every file is the batch's delivered image scaled so the batch's longest side is this number, so nothing exceeds it, a set delivered on one canvas gives files that all match it, and a set whose images wrap their own subjects gives files that differ the same way. The export holds files up to 3x it (4x on Android). | |
| generation | Yes | The id of the set to export - the random segment of its download URL, as list_recent_generations returns it. One batch per call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | ||
| ledger | No | The export's account of itself: per tree (web, ios, android, flutter) the densities, format, largest file and fidelity (crisp, or soft, meaning some blur, with the largest enlargement past source pixels), and every file with its tree, image name, density and pixel size. Also inside the zip as ledger.json. | |
| zipURL | No | The export zip; fetch and extract it as your first action after the call, the link expires with the set. | |
| quality | No | ||
| baseSize | No | ||
| expiresAt | No | ||
| generation | No |