The MyIMGs.org image hosting API uploads an image and returns a direct link in one request. Send a file or a base64 image with your API key and get JSON back, ready for apps, websites and forums. Every image is served from a CDN over HTTPS. API access is included in every Pro plan, from $3.29 a month.
Get your API key See the quick start
Replace YOUR_API_KEY with your key and run:
curl -X POST https://myimgs.org/api/v1/upload \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@photo.jpg"
The reply is JSON. Use data.url as the direct image link and data.viewer_url for the page that shows the image:
{
"success": true,
"data": {
"id": "AbC12xyz",
"name": "photo",
"extension": "jpg",
"size": 245891,
"url": "https://myimgs.org/storage/images/61178/photo.jpg",
"viewer_url": "https://myimgs.org/image/AbC12xyz"
}
}
One endpoint: POST https://myimgs.org/api/v1/upload
Send your key in the Authorization: Bearer YOUR_API_KEY header. For scripts written for ImgBB, a key form field works too. Use the header when you can, because form fields can end up in server logs.
| Field | Required | Description |
|---|---|---|
image | Yes | The image file (multipart form data), or a base64 string. A data URI such as data:image/png;base64,... is accepted. |
name | No | File name for the stored image. Only letters, numbers, dash and underscore are kept. Defaults to the uploaded file name. |
key | No | Your API key, if you do not use the Authorization header. |
| Field | Description |
|---|---|
success | true when the image was stored. |
data.id | Short ID of the image. |
data.name | Stored file name, without extension. |
data.extension | jpg, png, gif or webp, taken from the real file content. |
data.size | Stored size in bytes. |
data.url | Direct image link. Use it in <img> tags, BBCode and apps. |
data.viewer_url | Link to the page that displays the image. |
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("image", new Blob([await readFile("photo.jpg")]), "photo.jpg");
const res = await fetch("https://myimgs.org/api/v1/upload", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
body: form,
});
const json = await res.json();
console.log(json.data.url);
import requests
r = requests.post(
"https://myimgs.org/api/v1/upload",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"image": open("photo.jpg", "rb")},
)
print(r.json()["data"]["url"])
$ch = curl_init("https://myimgs.org/api/v1/upload");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
CURLOPT_POSTFIELDS => ["image" => new CURLFile("photo.jpg")],
CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($ch), true);
echo $data["data"]["url"];
Useful when the image only exists in memory, for example a canvas or a screenshot:
curl -X POST https://myimgs.org/api/v1/upload \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=$(base64 -w0 photo.jpg)" \
-F "name=photo"
Large photos upload faster when they are smaller. You can compress images in your browser with the free image compressor before you send them.
Errors return JSON like {"success": false, "error": "message"} with one of these status codes:
| Status | Meaning |
|---|---|
| 201 | Image stored. The response holds the links. |
| 401 | The API key is missing or wrong. |
| 403 | The account has no active Pro plan, or the account is disabled. |
| 413 | The image is larger than 64 MB. |
| 422 | No image was sent, the base64 text is invalid, or the file is not a JPG, PNG, GIF or WebP image. |
| 429 | More than 60 requests in one minute. Wait and retry. |
| Image size | 64 MB per image |
|---|---|
| Formats | JPG, PNG, GIF (animation kept) and WebP |
| Rate limit | 60 requests per minute for each account |
| Storage | Unlimited space on Pro plans |
| Delivery | CDN over HTTPS, direct links work in forums, websites and apps |
| Input | File upload or base64 |
If you already upload with the ImgBB API, switching takes two changes: point the request at https://myimgs.org/api/v1/upload and use your MyIMGs.org key. The key and image fields work the same way, and the direct link comes back in data.url. Pro plans add 64 MB images, no ads and unlimited space.
The API is included in every Pro plan. Pick the billing period that suits you:
$11.49 a month
$6.49 a month
billed $77.88
$3.29 a month
billed $118.44
See Pro plans and get your API key
Uploading with the API needs a Pro plan, which starts at $3.29 a month. A free account hosts up to 50 images from the website and has no API key.
64 MB per image. Larger files get a 413 error.
JPG, PNG, GIF and WebP. The format is read from the file itself, so a file with the wrong extension is still checked by its real content, and anything that is not a real image is refused. Animated GIFs stay animated.
No. Send the file as multipart form data, or send the image as a base64 string. Fetching URLs is left out on purpose for security.
Not yet. Upload is the only API call for now. Delete images from your dashboard.
Use Make a new key on your account page. The old key stops working immediately, and the new key is shown once.
60 requests per minute for each account. Above that the API answers with status 429 until the minute is over.
No. There is no expiry setting. Images uploaded with your key stay on your account.
Yes for the upload call. Send the same key and image fields to the MyIMGs.org URL. The direct link comes back in data.url.
MyIMGs.org is a free image hosting service. Upload an image on the home page without an account.