Zipper (Zipper)

Collect files from prior Flow steps — images, JSON outputs, or both — and bundle them into a single downloadable .zip archive. Add a Zipper whenever you want to give users a convenient “Download All” button at the end of a Flow.

Parameters

sourcesstring[]required

Array of step IDs to collect from. For ImageGenerator steps, all generated images are included. For all other step types, the JSON result is included as a .json file.

filenamestring

The desired zip file name. Default: "result.zip".

Example

{
  id: 'zipOutput',
  type: 'Zipper',
  parameters: {
    sources: [
      'ingredientsImageGenerator',
      'recipeImageGenerator',
      'recipeObjectsGenerator',
    ],
    filename: 'all_output.zip',
  },
}

When this step runs, it:

  1. Iterates over each source step in sources.
  2. For ImageGenerator steps — grabs all generated images and adds them as img_[sourceIndex]_[imageIndex].jpg.
  3. For all other steps — serializes the JSON result and stores it as [stepId].json.
  4. Uploads the resulting .zip to S3 and returns a signed URL.

After the step completes, the result looks like:

{
  "url": "https://lensless.io/runs/results/zips/123/all_output.zip"
}

Billing: Zipper costs (archive size in MB × $0.0035) + $0.01 per invocation. A 50 MB archive costs about $0.19.

File naming

  • Images: img_[sourceIndex]_[imageIndex].jpg (e.g., img_0_3.jpg)
  • JSON results: [stepId].json (e.g., recipeGenerator.json)

Edge cases

  • If a source step’s images or JSON aren’t found, that step is skipped.
  • If no content is found from any source, you’ll still get a .zip (potentially empty).

Best practices

Always add a Zipper step with a Download result widget if your Flow produces more than 10 images. Users will want to download everything at once rather than saving images individually.

  • Include both images and JSON — give users the raw data alongside the visual output.
  • Use a descriptive filename"dnd_party.zip" is more useful than "result.zip".
  • Pair with a Download widget — add { type: 'Download', sources: ['zipOutput'] } to your ui.results.widgets so users see the download button.

Last updated on March 19, 2026