REST multipart/form-data bearer auth

API documentation

Upload images programmatically from ShareX, scripts, your own apps.

Authentication

All upload requests require an API key. Get yours from the dashboard — click Regenerate key.

Send the key in either of these headers (pick one):

x-api-key: YOUR_API_KEY
Authorization: Bearer YOUR_API_KEY

⚠ The key is only shown once when generated. Lost it? Regenerate to get a new one (the old one stops working).

Endpoints

POST /api/upload

Upload an image (multipart). Returns the share URL.

Headers

x-api-key: YOUR_KEY

Body (multipart)

file: <binary>

Limits: 4 MB max. PNG/JPG/GIF/WEBP/SVG only.

Response (200)

{
  "success": true,
  "id": "aB3cD4eF",
  "url": "https://zy.vercel.app/i/aB3cD4eF",
  "direct_url": "https://...supabase.co/.../aB3cD4eF.png",
  "delete_url": "https://zy.vercel.app/api/images/aB3cD4eF"
}
GET /api/images

List your images (requires session cookie — not API key).

DELETE /api/images/:id

Delete one of your images. Requires session cookie.

PATCH /api/images/:id

Edit embed card metadata (title, description, color, site name).

{
  "embed_title": "Cool screenshot",
  "embed_description": "Custom subtitle",
  "embed_color": "#ff00aa",
  "embed_site_name": "my brand"
}

ShareX setup

Create imgshare.sxcu with this content, then double-click to import.

{
  "Version": "13.0.0",
  "Name": "imgshare",
  "DestinationType": "ImageUploader",
  "RequestMethod": "POST",
  "RequestURL": "https://zy.vercel.app/api/upload",
  "Headers": { "x-api-key": "YOUR_API_KEY_HERE" },
  "Body": "MultipartFormData",
  "FileFormName": "file",
  "URL": "{json:url}"
}

curl example

curl -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@screenshot.png" \
  https://zy.vercel.app/api/upload

🛝 Playground

Test the upload API right here. Your key isn't logged anywhere — it stays in your browser.