Create a ZIP
A report, its source data, and three supporting images belong together as one download, not five separate links that someone has to click one at a time. This endpoint takes a set of files and packages them into a single ZIP archive, generated on demand and delivered ready to hand to a user or store as one object.
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
The small task that's easy to skip and expensive to skip badly
Bundling files sounds trivial until it has to happen at scale, on a server, without blocking a request while a large archive compresses. A single export button that packages a user's invoices, an automated job that bundles daily log files, or a delivery step that hands over a finished asset alongside its licensing document all need the same thing: a reliable way to turn several files into one archive without writing and maintaining compression logic in every service that needs it.
What goes in and what comes out
You send the set of files to include, and the create zip file api returns a standard ZIP archive containing all of them, preserving names and folder structure where provided. The result is a genuinely standard ZIP file, openable by the built-in archive tool on any operating system and by every ZIP library in every language, which matters because the whole point of bundling is that the recipient should not need anything special to open it.
How the request and pricing work
POST the files to /data/zip and the call returns a task_id immediately, since assembling and compressing an archive is real work better handled off the request thread. The finished ZIP is delivered to your signed webhook or through a signed link valid for 24 hours once it is ready. Pricing is a flat $0.002 per request no matter how many files go into the archive, and a job that fails after three retries is never billed.
A format older than most of the software that uses it
The ZIP format dates back to 1989, designed originally to compress files for the bulletin board systems of that era, and it has remained essentially unchanged in its core structure ever since precisely because so much software depends on that stability. That decades-long consistency is exactly why ZIP remains the default choice for bundling files today: it is the one archive format that is safe to assume the recipient, whoever and wherever they are, already knows how to open.
Where it fits into a pipeline
Because the archive is delivered asynchronously as a finished file, this endpoint slots neatly after a report is generated, after a batch of user uploads is finalized, or as the last step of a data export job that needs to hand over everything at once instead of file by file. Access requires prepaid balance, which keeps requests fast and the service abuse-free. This endpoint is live now.
What you can do with it
Bundled data export
A SaaS platform zips a user's exported data, invoices and account summary into one archive when they request a full download of their account.
Delivering a finished project
A design tool zips final artwork files together with a licensing document and a readme before handing the download link to a client.
Log archiving
An automated job zips the previous day's log files into a single archive each night before uploading it to long-term storage.
Batch report packaging
A reporting service zips dozens of individually generated PDF reports into one archive so a manager receives a single file instead of dozens of separate downloads.
FAQ
How do I create a ZIP file with an API?
POST the files to /data/zip. The create zip file api returns a task_id right away and delivers the finished archive to your webhook or a signed link once it is ready.
Is this API free to use?
The tool above runs free in your browser. The API is paid — each call draws from your prepaid ForHosting KIT balance: top up from $10.00 (it never expires), pay each request's published price, and a call with no balance returns HTTP 402. No subscription, no tokens, and a failed task is never charged.
Does the price change based on how many files I include?
No, the price is a flat $0.002 per request regardless of how many files are bundled into the archive.
Can I preserve a folder structure inside the ZIP?
Yes, folder paths provided with the files are preserved in the resulting archive, so the ZIP opens with the same structure you specified.
What archive format does it produce?
It produces a standard ZIP archive, openable with the built-in tools on every major operating system and any ZIP-compatible library.
Can I zip large files or many files at once?
Yes, because processing is asynchronous the endpoint is built to assemble larger archives without blocking your request thread while compression runs.
Is the ZIP API live now?
Yes, this endpoint is live today at the published price of $0.002 per request.
What happens to my files after the archive is created?
Both the source files and the resulting archive are deleted after the retention window and are never used for training. Delivery is by signed webhook or a signed link valid for 24 hours.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/data/zip \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"…"}'const res = await fetch("https://api.kit.forhosting.com/data/zip", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"input": "…"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/data/zip",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"input": "…"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/data/zip", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"input":"…"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"input":"…"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/data/zip", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"input": "…"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "data.zip",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 25 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |