Image hosting API

Image in. URL out.

Temporary image upload API

A temporary image hosting API. Send bytes, get a short URL. Same limits as the site. Authenticated only — no anonymous /api/v1.

  • Bearer key — dropimg_api_…
  • Upload, list, delete
  • Expires: 1h · 24h · 7d · 30d · 90d

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"];

API questions

Is this a temporary image upload API?

Yes. DropIMG is an image hosting API for short-lived links, not a permanent archive. Default expiry is 7 days when your plan allows it. Free: 1h, 24h, 7d. Pro also has 30d and 90d.

Do I need an account?

Yes for /api/v1. Create an API key on Integrations. Anonymous uploads stay on the website and ShareX — not on the public REST API.

What scopes does a key have?

images:write, images:read, and images:delete. New keys get all three. Uncheck any you do not want. ShareX and extension tokens stay upload-only.

Where is the OpenAPI spec?

https://dropimg.io/openapi/v1.yaml — same routes as this page.