Upload API
Implement uploads in any language. Base URL: https://www.madethis.website
Chunked upload no auth
For folders, zips, or large files. Three steps: init → chunk → finalize.
1. Init
POST /api/upload/init
Content-Type: application/json
{"totalBytes": 12345, "ttlSeconds": 3600}Returns uploadId and chunkSize (3 MB).
2. Chunk
POST /api/upload/chunk
Content-Type: application/octet-stream
x-upload-id: <uploadId>
x-chunk-index: 0
<raw bytes>3. Finalize
POST /api/upload/finalize
Content-Type: application/json
{
"uploadId": "<uploadId>",
"totalChunks": 1,
"ttlSeconds": 3600,
"sha256": "<sha256 hex of full zip>"
}Returns slug and url like /s/abc12345/.
CLI upload api key
Single request for scripts. Get your key at /admin.
curl -fsS -X POST "https://www.madethis.website/api/cli/upload?ttl=1h" \
-H "Authorization: Bearer $MADETHIS_API_KEY" \
-H "Content-Type: text/html; charset=utf-8" \
--data-binary @index.htmlSupported: .html · .md · .js / .css (auto-wrapped) · .zip
Response includes fullUrl ready to share.
Serving
GET /s/{slug}/
GET /s/{slug}/app.js
GET /s/{slug}/about.html
GET /s/{slug}/readme.md?raw=1HTML, JS, and CSS render in the browser. Markdown files get a built-in viewer (headings, code blocks, links). Use ?raw=1 for the source text.
Expired → 410. Missing → 404.
Limits
- 8 MB packed zip · 500 files max
- TTL:
3600(1h) or86400(24h) - Rate limits: 10 uploads/hr per IP (web), 30/hr (CLI)
Full reference with Python/JS examples: API.md on GitHub