# Temp.sh — Zapi reference > Upload a file to a temporary host with short retention. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/uploader/temp-sh - Endpoint catalog: https://zpi.web.id/category/uploader - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Temp.sh **Category:** uploader · **Slug:** `temp-sh` **Detail page:** https://zpi.web.id/api/uploader/temp-sh Upload a file to a temporary host with short retention. **Tags:** uploader, file-host ### Upload Upload a file via multipart and return the temporary URL. - **Method:** `POST` - **Endpoint:** `https://api.zpi.web.id/v1/uploader:temp-sh/upload` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `file` | file | form | yes | File yang mau di-upload. | | `filename` | string | form | no | Nama file optional untuk URL. | **cURL:** ```bash curl -X POST "https://api.zpi.web.id/v1/uploader:temp-sh/upload" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file": "photo.jpg", "filename": "photo.jpg" }' ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/uploader:temp-sh/upload", { method: "POST", headers: { "x-api-key": process.env.ZAPI_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ "file": "photo.jpg", "filename": "photo.jpg" }) }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.post("https://api.zpi.web.id/v1/uploader:temp-sh/upload", headers={"x-api-key": "YOUR_API_KEY"}, json={ "file": "photo.jpg", "filename": "photo.jpg" }) data = r.json() ``` **Example response:** ```json { "ok": true, "url": "https://temp.sh/pknLa/photo.jpg", "host": "temp.sh", "fileName": "photo.jpg", "fileSize": 67105, "uploadedAt": "2026-05-27T13:38:45.913Z", "retentionDays": 3 } ``` --- _Generated: 2026-08-02T14:23:14.022Z_