curl
curl -X POST https://dropimg.io/api/v1/images \
-H "Authorization: Bearer $DROPIMG_API_KEY" \
-F file=@shot.png \
-F expiry=7d
Response
{
"id": "abc123xy",
"url": "https://dropimg.io/abc123xy",
"image_url": "https://dropimg.io/i/abc123xy",
"created_at": "2026-09-07T12:00:00.000Z",
"expires_at": "2026-09-14T12:00:00.000Z"
}
Auth
Authorization: Bearer dropimg_api_…. Keys are shown once. Revoke them on Integrations. Do not put a key in a query string.
Routes
- POST /api/v1/images — multipart file + optional expiry=7d. Scope images:write.
- GET /api/v1/images/:id — one of your live images. Scope images:read.
- GET /api/v1/images — list envelope with next_cursor. Scope images:read.
- DELETE /api/v1/images/:id — owner delete. Scope images:delete. Create does not return a delete token.
Limits
Same entitlements as the rest of DropIMG: 10 MB on Free, plan expiries, burst and daily quota. Errors are { "error", "code" } with 401 or 403 when the key is missing or too narrow.
Other languages
JavaScript
const form = new FormData();
form.append("file", file);
form.append("expiry", "7d");
const res = await fetch("https://dropimg.io/api/v1/images", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.DROPIMG_API_KEY}` },
body: form,
});
const image = await res.json();
console.log(image.url);
Python
import os, requests
r = requests.post(
"https://dropimg.io/api/v1/images",
headers={"Authorization": f"Bearer {os.environ['DROPIMG_API_KEY']}"},
files={"file": open("shot.png", "rb")},
data={"expiry": "7d"},
)
print(r.json()["url"])
Node
import { readFile } from "node:fs/promises";
const form = new FormData();
form.set("file", new Blob([await readFile("shot.png")]), "shot.png");
form.set("expiry", "7d");
const res = await fetch("https://dropimg.io/api/v1/images", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.DROPIMG_API_KEY}` },
body: form,
});
console.log((await res.json()).url);
PHP
<?php
$ch = curl_init("https://dropimg.io/api/v1/images");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("DROPIMG_API_KEY")],
CURLOPT_POSTFIELDS => [
"file" => new CURLFile("shot.png"),
"expiry" => "7d",
],
CURLOPT_RETURNTRANSFER => true,
]);
echo json_decode(curl_exec($ch), true)["url"];