CDN API docs
Free upload API.
Upload images, audio, and PDFs from any project and share a link that looks like it comes from our CDN. No key needed — rate limited per IP.
Endpoints.
Base URL: https://studio.bytarch.com
POST /cdn_upload.php
Multipart form field file. Max 5 MB. Types: JPEG, PNG, WebP, GIF, WAV, MP3, PDF.
curl -F "[email protected]" https://studio.bytarch.com/cdn_upload.php
// {"ok":true,"id":"a1b2c3d4e5f6.png","url":"https://studio.bytarch.com/serve.php?id=a1b2c3d4e5f6.png&raw","size":123456,"type":"image/jpeg"}
GET /serve.php?id=…&raw
The proxy. Serve the file raw (no HTML wrapper) with correct MIME and 24h cache — use the url from the upload response.
fetch("https://studio.bytarch.com/serve.php?id=a1b2c3d4e5f6.png&raw")
Browser / app usage — copy into your project
upload.js
const fd = new FormData();
fd.append("file", input.files[0]);
const res = await fetch("https://studio.bytarch.com/cdn_upload.php", {
method: "POST",
body: fd
});
const { url } = await res.json();
// url is your CDN link
img.src = url; // <img>
audio.src = url; // <audio controls>
a.href = url; // share / download link
Limits & errors.
Size
5 MB max per file. 413 if bigger.
Types
JPEG, PNG, WebP, GIF, WAV, MP3, PDF only. 415 otherwise.
Rate
20 uploads / IP / hour. 429 when limited. Files live as long as the link is shared.