Choose Your Integration Path
Pick between browser-only ZIP creation, Cloud with a public key, a backend-created session, or the HTTP API, based on where your file URLs live.
Eazip.js works as a standalone browser library with no account or backend. When a URL-based job needs managed execution, the same packages and job model can also connect to Eazip. Start on the simplest path and move only when the workload requires it.
One question decides most of it: does the browser already have the file URLs? A gallery that renders images already holds usable URLs. An "export my account" button usually doesn't — the list exists only on your server.
The four paths
| Local | Cloud + public key | Cloud + backend session | HTTP API | |
|---|---|---|---|---|
| ZIP is created | In the browser | In Eazip Cloud | In Eazip Cloud | In Eazip Cloud |
| URL list lives | In the browser | In the browser | Server only | Server only |
| Key required | None | pk_ in the client | zk_ on the server | zk_ on the server |
| Progress and resume | SDK | SDK | SDK | Your code (poll or webhook) |
| Best for | Everyday downloads | Large jobs, fastest setup | Private or huge URL lists | No browser involved |
The browser already has the URLs
Pass them straight to the SDK. No account, key, or backend is needed:
import { createZip } from '@eazip/core';
const result = await createZip({
files: imageUrls,
zipName: 'photos.zip',
});
result.download();When the archive outgrows the tab — multi-gigabyte totals, thousands of URLs, or a job that must survive a reload — keep the same call and add a strategy:
const result = await createZip({
strategy: 'cloud',
publicKey: 'pk_ez_...',
files: imageUrls,
zipName: 'photos.zip',
});Get a public key and scope it to your origins and source hosts.
The browser doesn't have the URLs
The list exists on your server. You have two options, and the difference is how much travels over the network.
Option 1 — return a signed URL list. Your endpoint authorizes the user,
signs each object, and returns { url, filename } entries for the browser
to zip. This is the only option that works without an Eazip account, since
Local runs entirely in the browser, and it is what the
platform guides implement first. The cost is structural: a
1,000-file export ships 1,000 signed URLs before the job starts.
Option 2 — create the session on your backend. With Cloud, your endpoint builds the source list server-side and returns only a small session handle:
const job = startZip({
strategy: 'cloud',
zipName: 'export.zip',
createSession: async ({ signal, zipName, mode }) => {
const response = await fetch('/api/exports/123/eazip-session', {
method: 'POST',
credentials: 'include',
signal,
body: JSON.stringify({ zipName, mode }),
});
if (!response.ok) throw new Error('Failed to create Eazip session');
return response.json(); // { sessionId, clientSecret }
},
});The URL list never crosses the network, the browser never sees source URLs or keys, and the SDK still owns progress, resume, and the download UI. See Backend-created sessions for the server side.
No browser in the loop
Scheduled exports, pipelines, and "email the user a link" flows call the
HTTP API directly with a secret zk_ key: create a
job, receive a webhook when it finishes, and
deliver the output URL however you like. No frontend SDK is involved.
How to decide
- URLs already in the browser → Local, and add
strategy: 'cloud'only when the job outgrows the tab. - URLs only on your server, zipping in the browser → signed URL list endpoint plus Local.
- URLs only on your server, running the job in Cloud → backend session; don't build a URL-list endpoint just to download.
- No user waiting in a browser → HTTP API.
Cloud is not a paid-only escalation: its free tier covers typical use, so pick between these paths on architecture, not price.
Each platform guide shows paths 1–2 in full and links back here when your situation calls for 3 or 4.