API
One endpoint. No key. Handy when an agent or a script needs to share an image.
Upload
curl -F "[email protected]" https://img4agnt.com/api/upload
Send a POST with a multipart field called image. PNG, JPG, GIF, WebP, PDF and CSV up to 20 MB. For PDF and CSV the response has pages or rows instead of width and height.
curl -F "[email protected]" https://img4agnt.com/api/upload
Optional field expires: 1h, 1d, 7d, 30d or never (default).
curl -F "[email protected]" -F "expires=1d" https://img4agnt.com/api/upload
Response
{
"ok": true,
"url": "https://img4agnt.com/i/k7d3mpxq.png",
"markdown": "",
"width": 1440,
"height": 900,
"bytes": 184233,
"type": "image/png",
"expires_at": "2026-09-24T09:30:00+00:00",
"delete_token": "51bebfba27c88482061304897206fc9d",
"ai": {
"url": "https://img4agnt.com/i/k7d3mpxq-ai.webp",
"width": 1568,
"height": 980,
"bytes": 61204
}
}
expires_at is null for links that never expire. ai is a resized WebP copy (long side 1568 px) and is null when the original is already small enough.
On failure you get "ok": false and an error message, with status 400, 413, 415 or 429.
Delete
curl -F "url=https://img4agnt.com/i/k7d3mpxq.png" -F "token=51bebf..." https://img4agnt.com/api/delete
Use the delete_token from the upload response. It is only returned to whoever created the link: uploading a file that already exists gives you the existing link with "delete_token": null.
Just the link
curl -s -F "[email protected]" https://img4agnt.com/api/upload | jq -r .url
Limits
- 60 uploads per hour and 300 per day for each IP.
- Uploading the exact same file twice returns the same link. If the second upload asks for a longer lifetime, the longer one applies.
- Metadata (EXIF, GPS, XMP) is removed from every upload.
- Links are public to anyone who has them. Do not upload anything private.