The Upload Endpoint
kinja-img.com provides a REST API endpoint for programmatic image uploads:
POST https://kinja-img.com/api/upload
Content-Type: multipart/form-dataThe endpoint accepts a single file in the file field. Maximum file size is 50MB. Supported formats: JPEG, PNG, GIF, WebP, AVIF, BMP, TIFF, ICO, and SVG.
Optional parameters:
expiry(form field orX-Expiryheader) —1h,24h,7d,30dX-Strip-Exif: true(header) — remove EXIF metadata before saving
curl Examples
Basic upload:
curl -X POST https://kinja-img.com/api/upload \
-F "[email protected]"Upload with 24-hour expiry and EXIF stripping:
curl -X POST https://kinja-img.com/api/upload \
-F "[email protected]" \
-F "expiry=24h" \
-H "X-Strip-Exif: true"Upload from stdin (pipe from another command):
cat image.png | curl -X POST https://kinja-img.com/api/upload \
-F "file=@-;filename=image.png"Upload and extract URL with jq:
curl -s -X POST https://kinja-img.com/api/upload \
-F "[email protected]" | jq -r .urlAPI Response Format
Successful upload returns JSON:
{
"success": true,
"url": "https://kinja-img.com/i/a1b2c3d4e5f6g7h8i9j0",
"direct_url": "https://i.kinja-img.com/a1b2c3d4e5/image.png",
"delete_url": "https://kinja-img.com/api/delete?file=a1b2c3d4e5&token=...",
"expires_at": 1739577600
}Fields:
url— the viewer page link (with embed codes, QR code, image info)direct_url— the CDN link to the raw image filedelete_url— single-use link to delete the imageexpires_at— Unix timestamp when the image expires (nullif no expiry)
Error responses return {"success": false, "error": "description"} with appropriate HTTP status codes (400, 413, 415, 429).
ShareX Setup (Windows)
ShareX is a popular Windows screenshot tool that supports custom upload destinations. Setting up kinja-img.com as your ShareX host takes one click:
- Go to the API & Integrations page
- Click "Download ShareX Config" to download the
.sxcufile - Double-click the downloaded file — ShareX will import it automatically
- ShareX will ask to set kinja-img.com as your default upload destination — confirm
From now on, every screenshot you take with ShareX will be uploaded to kinja-img.com, and the viewer URL will be automatically copied to your clipboard. You can paste it directly into any chat or document.
The config uses the /api/upload endpoint and parses the JSON response to extract the viewer URL.
Flameshot Setup (Linux)
Flameshot is a screenshot tool for Linux with a built-in annotation editor. kinja-img.com provides a shell script for one-step capture-and-upload:
- Go to the API & Integrations page
- Click "Download Flameshot Script"
- Make it executable:
chmod +x kinja-upload.sh - Bind it to a keyboard shortcut in your desktop environment
The script captures a screenshot with Flameshot, uploads it via curl, extracts the URL from the JSON response, and copies it to your clipboard using xclip.
You can customize the script to add default expiry:
flameshot gui --raw | curl -s -X POST \
https://kinja-img.com/api/upload \
-F "file=@-;filename=screenshot.png" \
-H "X-Expiry: 24h" | jq -r .url | xclip -sel clip