← back to imgshare.lol

API Reference

Base URL: https://imgshare.lol

No authentication is required to upload. Deletion requires the key returned at upload time — store it if you need to delete later.

POST/api/upload

Upload an image. Accepts multipart/form-data with a single file field. Images are compressed client-side before upload.

request

curl -X POST https://imgshare.lol/api/upload \
  -F "file=@photo.png"

response

{
  "id": "Mh69Y4",
  "link": "https://imgshare.lol/Mh69Y4",
  "key": "Xk9mN2pQrLwY...",
  "delete": "https://imgshare.lol/api/delete?key=Xk9mN2pQrLwY..."
}
DELETE/api/delete?key={key}

Permanently delete an uploaded image. Use the key returned from the upload response.

request

curl -X DELETE "https://imgshare.lol/api/delete?key=Xk9mN2pQrLwY..."

response

{
  "success": true
}
GET/{id}

View the image in a page. Includes a back link and download button.

request

curl "https://imgshare.lol/Mh69Y4"

response

<HTML viewer page>
GET/raw/{id}

Serve the image bytes directly. Add ?dl=1 to trigger a file download. Responses are cached indefinitely via Cache-Control immutable.

request

curl "https://imgshare.lol/raw/Mh69Y4"

response

<image bytes>
Content-Type: image/jpeg
Cache-Control: public, max-age=31536000, immutable
Rate Limiting

Upload requests are limited to 100 uploads per IP per day (resets at midnight UTC). Exceeding the limit returns a 429 Too Many Requests response.

Every upload response includes rate limit headers:

Storage & Retention

Images are stored on Cloudflare R2 and served from Cloudflare's global network. We reserve the right to remove images that violate our Terms of Service.

File Limits