Documentation
Everything you need to upload, host, and embed images, videos, and files.
Quick start
Upload a file and get a permanent URL in one request.
curl -X POST https://blazeimg.vercel.app/api/upload \
-F "[email protected]"Response: { "url": "https://blazeimg.vercel.app/api/file/users/.../photo.png", "key": "...", "size": 12345, "type": "image/png" }
API Reference
/api/uploadUpload a file. Returns a permanent URL.
Auth: optional (associates with user if signed in, otherwise "anonymous")
Body: multipart/form-data with field file
Limits: images 10MB, videos 50MB, code files 5MB
Supported: PNG, JPG, WebP, GIF, AVIF, SVG, MP4, WebM, MOV, HTML, CSS, JS, TS, JSX, TSX, JSON, XML, TXT
/api/imagesList your uploaded images.
Auth: required
/api/imagesDelete an image by key.
Auth: required
Body: { "key": "users/.../file.png" }
/api/file/{key}Serve any uploaded file with correct Content-Type and CORS headers.
Cache: public, max-age=31536000, immutable
CORS: Access-Control-Allow-Origin: *
/api/remove-bgRemove image background via API4AI. Returns PNG.
Auth: required
Body: multipart/form-data with field file
/api/healthHealth check for Vercel Functions.
Embeddable uploader
Embed a file uploader in any app. The widget communicates via postMessage.
<iframe src="https://blazeimg.vercel.app/embed/uploader" width="100%" height="300" style="border:none"></iframe>Messages sent to parent:
{ type: "blazeimg:ready" }— widget loaded{ type: "blazeimg:upload", url, key, size, mimeType }— upload success{ type: "blazeimg:error", error }— upload failed
Framework examples
HTML
<img src=".../photo.png" />
<video src=".../clip.mp4" controls />React
const url = ".../photo.png";
<img src={url} alt="x" />Angular
imageUrl = ".../photo.png";
<img [src]="imageUrl" />