ZIP Files API integration guide
This guide takes you from an API key to a working zip files call in your own stack: plain HTTP, Node.js, Python,
Bubble, Make and n8n. Every example calls the same endpoint, /v1/files/zip, and gets the same response.
The parameters are listed in the ZIP Files API reference.
Before you write code, try the same job in the free online version. It runs on the same worker, so what you see there is what the API returns.
Step 1: get a key
Create an account to get 1 USD of free credit, with no card. At $0.003 a call, that is 333 calls. Keep the key on your server or in a backend workflow. Never put it in browser code.
Step 2: make the call with curl
curl https://api.justapi.tech/v1/files/zip \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"sources": [{"url": "https://files.example.com/a.pdf"}, {"file_id": "file_01HZY..."}], "options": {"names": ["invoice.pdf", "photo.jpg"], "filename": "order-1042.zip"}}'
The response has status, a result with a download url that expires, and billing.charged_micros, the
exact charge in millionths of a dollar.
Step 3: Node.js
const res = await fetch('https://api.justapi.tech/v1/files/zip', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.JUSTAPI_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({"sources": [{"url": "https://files.example.com/a.pdf"}, {"file_id": "file_01HZY..."}], "options": {"names": ["invoice.pdf", "photo.jpg"], "filename": "order-1042.zip"}}),
});
const job = await res.json();
if (!res.ok) throw new Error(`${job.error.code}: ${job.error.message}`);
console.log(job.result.url, job.billing.charged_micros);
Step 4: Python
import os, uuid, requests
res = requests.post(
"https://api.justapi.tech/v1/files/zip",
headers={
"Authorization": f"Bearer {os.environ['JUSTAPI_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"sources": [
{
"url": "https://files.example.com/a.pdf"
},
{
"file_id": "file_01HZY..."
}
],
"options": {
"names": [
"invoice.pdf",
"photo.jpg"
],
"filename": "order-1042.zip"
}
},
timeout=60,
)
job = res.json()
res.raise_for_status()
print(job["result"]["url"], job["billing"]["charged_micros"])
Step 5: Bubble
- Install the API Connector plugin and add an API called JustAPI.
- Add a shared header
Authorizationwith the valueBearer YOUR_API_KEY, and tick Private so it never reaches the browser. - Add a call named
zip-files: method POST, URLhttps://api.justapi.tech/v1/files/zip, Use as: Action, body type JSON. - Paste this body and replace the file URL with a dynamic value:
{"sources": [{"url": "<dynamic file URL>"}, {"file_id": "file_01HZY..."}], "options": {"names": ["invoice.pdf", "photo.jpg"], "filename": "order-1042.zip"}}
- Initialize the call with a real file, then use it in a backend workflow. Save
result urlto your thing, or download it to Bubble storage if you need it after the link expires.
Step 6: Make and n8n
In Make, use the HTTP > Make a request module; in n8n, the HTTP Request node. Method POST, the URL above, the
Authorization header, body type JSON with the same body. Turn on "parse response" so the next step can read
result.url.
Errors and retries
- Every error has a stable
error.code, listed in error codes. A4xxmeans fix the request; do not retry it unchanged. - A failed call costs nothing. You can retry a
5xxsafely. - Send an
Idempotency-Keyon every POST. If a workflow retries, you get the first response back and pay once. - The result link expires. Copy the file to your own storage if you need it later.
Recommendations
- Pass earlier results by
file_idso nothing is downloaded again. - Set
namesto give each file a clear name inside the ZIP; duplicates get a suffix. - Already-compressed files such as JPEG and PDF do not shrink much in a ZIP; the point is one download.
- The ZIP link expires like every result; copy it to your storage if you need it later.
What it will cost
| Use case | What it does | Calls a month | Estimated cost a month |
|---|---|---|---|
| Bubble app | Lets users download all files of a project as one ZIP. | 2,000 | $5.50 |
| Photo delivery | Bundles a client's gallery for download. | 600 | $1.80 |
| Month-end export | Zips every invoice PDF of the month for the accountant. | 150 | $0.45 |
- Bubble app: Up to 100 files per call.
- Photo delivery: Custom names per file.
- Month-end export: Previous results by file_id.
Costs use the published volume tiers: the first 1,000 calls of the month at tier 1, calls 1,001 to 10,000 at tier 2, and every call after that at tier 3. Failed calls cost nothing, so they are not in these figures.
Compare providers in ZIP files API pricing: who offers it and for how much, and see every price on the pricing page.