Upload featured images and inline post media to the BlogHunch CDN (cdn.bloghunch.com). Static images are automatically optimized to WebP and returned with dimensions and a blurhash placeholder.
Upload or import media
POSThttps://api.bloghunch.com/v1/media
Accepts either a multipart/form-data file field (jpg, jpeg, png, webp, gif up to 5 MB) or a JSON { "url": "https://..." } payload to fetch a remote image safely (SSRF-validated). Requires media:write.
POSTRequest
curl -X POST https://api.bloghunch.com/v1/media \
-H "Authorization: Bearer {token}" \
-F file=@./hero.pngcurl -X POST https://api.bloghunch.com/v1/media \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/assets/hero.png"}'{
"data": {
"filename": "aB3dE5fG7hJ9kL1m.webp",
"url": "https://cdn.bloghunch.com/uploads/aB3dE5fG7hJ9kL1m.webp",
"mime_type": "image/webp",
"size_bytes": 48210,
"width": 1200,
"height": 630,
"blurhash": "LKO2?U%2Tw=w]~RBVZRi};RPxuwH"
}
}Delete media
DELETEhttps://api.bloghunch.com/v1/media
Pass { "filename": "aB3dE5fG7hJ9kL1m.webp" } in the JSON body to permanently remove an uploaded file. Requires media:delete.