BeeIMG API

API Base: beeimg.com/api/ (HTTP or HTTPS)

IPv6 Base: ipv6.beeimg.com/api/ (use if Cloudflare returns 403)

Ask AI:
Opens the tool in a new tab and copies a ready-made prompt (with a link to our LLM reference doc) to your clipboard — just paste it in.
AI assistants & coding tools: connect this API over MCP MCP setup & use cases

API Endpoints

Submit Supports Output URL
File GET POST text json jsonp XML redirect //beeimg.com/api/upload/file/{Output}/
URL GET POST text json jsonp XML redirect //beeimg.com/api/upload/url/{Output}/
Note: We highly recommend using JSON output, as it is what we use and have the most support for.

Test URLs

Choose method and output format. The URL updates automatically.

Ready

Input Keys

  • In the file method, send your file as "image" or "file" using either GET or POST.
  • In the URL method, send your URL as "url" using either GET or POST.
  • To add an image to an album, include the "albumid" along with your API key "apikey" in the request using either GET or POST.
  • For image deletion requests, send the deletion key as "delete_key" to the delete URL along with your API key "apikey" using only POST.
  • To set the privacy of the uploaded image, include the "privacy" parameter with values "public", "private" (unlisted — hidden from search but accessible via link), or "truly-private" (only you and admins can see it — Premium feature) in your request using either GET or POST. The default setting is public.

Allowed File Types & Limits

Plan Allowed Extensions Max File Size
Free JPG, PNG, GIF, WEBP, AVIF, HEIC, HEIF, ICO, APNG 1 MB per image
Premium / Super Uploader Same extensions as Free Higher limit — see FAQ Q7 for current numbers
  • Files that fail the extension check return error code 2; files that fail the real content/format check return 3 (see Error Codes).
  • Oversized files return error code 4.
  • Premium removes ads and raises storage/upload limits — see the Upload Limits FAQ and Compare All Plans for exact figures, since these can change.

Albums API

Manage albums and folders programmatically. All requests require authentication via apikey or session cookie.

List Your Albums

curl -b "uid=...;pass=..." \
     "https://beeimg.com/api/album?mode=list"

Returns all albums owned by the authenticated user.

Create an Album

curl -X POST \
     -d "action=create_album" \
     -d "title=My Album" \
     -b "uid=...;pass=..." \
     "https://beeimg.com/api/album"

Returns the new album_id (5 characters).

Get Album Details & Folders

# Get album metadata, folders, and images
curl "https://beeimg.com/api/album?id=abc12"

# Get a specific folder (9-char ID) — same endpoint
curl "https://beeimg.com/api/album?id=abcdefghi"

The response includes a folders array with each folder's id, name, and image count. Use the folder id to upload directly into it.

Create a Sub-Folder

curl -X POST \
     -d "action=create_folder" \
     -d "main_album_id=abc12" \
     -d "parent_id=abc12" \
     -d "name=Vacation 2026" \
     -b "uid=...;pass=..." \
     "https://beeimg.com/api/album"

Returns the new folder id (9 characters). Use parent_id=abc12 for top-level folders, or a folder ID for nested sub-folders.

Upload to a Sub-Folder

Use the 9-char folder ID directly as albumid — no separate folder parameter needed:

# Upload to album root (5-char master album ID)
curl -F [email protected] \
     -F apikey=aaaa \
     -F albumid=abc12 \
     https://beeimg.com/api/upload/file/json/

# Upload directly into a sub-folder (9-char folder ID as albumid)
curl -F [email protected] \
     -F apikey=aaaa \
     -F albumid=abcdefghi \
     https://beeimg.com/api/upload/file/json/
  • albumid accepts both master album IDs (5 chars) and folder IDs (9 chars).
  • When using a folder ID, the image is placed directly into that sub-folder.
  • Get folder IDs from the album details response (folders array).

Move Images Between Folders

# Move images from one folder/album to another
curl -X POST \
     -d "action=move_image" \
     -d "from_album_id=abcdefghi" \
     -d "to_album_id=abcdef123" \
     -d "image_ids=c4661798442,t5125804229" \
     -b "uid=...;pass=..." \
     "https://beeimg.com/api/album"

Moves images from source to target. Accepts image_ids as comma-separated BIDB IDs (letter + 10 digits), or a single image_id. Images already in the target are skipped. Returns moved, skipped, and requested counts.

Move Folders

# Re-parent folders within the same album
curl -X POST \
     -d "action=move_folder" \
     -d "new_parent_id=abcdef123" \
     -d "folder_ids=aaaaaaaaa,bbbbbbbbb" \
     -b "uid=...;pass=..." \
     "https://beeimg.com/api/album"

Moves folders to a new parent within the same album. Accepts folder_ids as comma-separated 9-char IDs, or a single folder_id. Prevents moving a folder into itself or its own descendants. Returns moved, unchanged, and failed (with per-folder error details).

Move All Images in a Folder

# Move every image from one container to another
curl -X POST \
     -d "action=move_all_images" \
     -d "from_album_id=abcdefghi" \
     -d "to_album_id=abcdef123" \
     -b "uid=...;pass=..." \
     "https://beeimg.com/api/album"

Bulk-moves all images from source to target. Subfolders are not affected. Returns the number of moved images.

Get Folder Tree (for Move UI)

curl "https://beeimg.com/api/album?id=abc12&mode=tree" \
     -b "uid=...;pass=..."

Owner-only. Returns a flat list of all folders in the album (id, name, parent_id) for building a folder-tree picker in move dialogs.

Example Code

Image Upload

		
// Initialize a cURL session
$ch = curl_init();

// Create an array containing the file to be uploaded and the API key
$postData['file'] = new CURLFile('localfile.jpg'); // Specify the local file to upload

// Add the API key (optional, required if authentication is needed)
$postData['apikey'] = "aaaa";

// Add optional parameters (e.g., album ID)
// $postData['albumid'] = "zzzz";

// Add optional parameters (e.g., privacy setting)
// $postData['privacy'] = "public"; // or "private"

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Return the response as a string instead of outputting it
curl_setopt($ch, CURLOPT_POST, 1); // Use the HTTP POST method
curl_setopt($ch, CURLOPT_URL, 'https://beeimg.com/api/upload/file/json/'); // Set the API endpoint URL
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); // Attach the POST data (file and API key)

// Execute the API request and store the response
$response = curl_exec($ch);

// Close the cURL session to free resources
curl_close($ch);

// Decode the JSON response into an associative array
$jsonResponse = json_decode($response, true);

// Output the response (for debugging purposes)
var_dump($jsonResponse);
		
	

Image Delete

		
// Initialize a cURL session
$ch = curl_init();

// Create an array containing the delete key and API key
$postData = [
    'delete_key' => 'dddd', // The key required to delete the image from the upload request
    'apikey' => 'aaaa' // API key for authentication (if required)
];

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Return the response as a string instead of outputting it
curl_setopt($ch, CURLOPT_POST, 1); // Use the HTTP POST method
curl_setopt($ch, CURLOPT_URL, 'https://beeimg.com/delete/a123456789/'); // Set the API endpoint URL for deleting the image
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); // Attach the POST data (delete key and API key)

// Execute the API request and get the response
$response = curl_exec($ch);

// Close the cURL session to free resources
curl_close($ch);

// Output the response (for debugging purposes)
var_dump($response); //Returns "OK" or "ERROR"
		
	
	  curl -F [email protected] https://beeimg.com/api/upload/file/text/ 
  
	  
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

// create a form and append the file
const form = new FormData();
form.append('file', fs.createReadStream('localfile.jpg'));

// add the api key
//form.append("apikey", "aaaa");
//form.append("albumid", "zzzz");
//form.append("privacy", "public"); // or "private"

// get the content-type header with the boundary
const headers = form.getHeaders();

// send the request with axios
axios.post('https://beeimg.com/api/upload/file/text/', form, {headers})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
});
      
  

Example Responses

  
  //beeimg.com/images/a123456789.webp
  
  

Note: this only returns url

Image Upload Success

  
  {
    "files": {
        "name": "p2465821538",
        "size": "6251",
        "url": "https://beeimg.com/images/p24658215384.png",
        "thumbnail_url": "https://i.beeimg.com/images/thumb/p24658215384-xs.png",
        "view_url": "https://beeimg.com/view/p2465821538/",
        "album_url": "#",
        "delete_url": "https://beeimg.com/delete/p2465821538/",
        "delete_key": "#",
        "status": "Success",
        "code": "200",
        "storage_used": 23712770,
        "storage_limit": 5368709120,
        "storage_remaining": 5344996350
    }
  }
  
  
  • album_url only appears when the upload included an albumid.
  • delete_key only holds a real deletion key for anonymous uploads (no apikey). For uploads made with an apikey, it returns "#" as a placeholder — use your account dashboard or apikey + delete_url to delete those instead.

Image Upload Error

  
  {
    "files": {
      "status": "Please come back with a URL Thank you :)",
      "code": "0"
    }
  }
  
  
  
	<?xml version="1.0"?>
	<files>
		<name>a123456789</name>
		<size>100</size>
		<url>https://beeimg.com/images/a1234567891.webp</url>
		<thumbnail_url>https://i.beeimg.com/images/thumb/a1234567891-xs.webp</thumbnail_url>
		<album_url>#</album_url>
		<view_url>https://beeimg.com/view/a123456789/</view_url>
		<delete_key>#</delete_key> <!-- "#" for apikey uploads, real key for anonymous uploads -->
		<delete_url>https://beeimg.com/delete/a123456789/</delete_url>
		<status>Success</status>
		<code>200</code>
		<storage_used>1073741824</storage_used>
		<storage_limit>53687091200</storage_limit>
		<storage_remaining>52613349376</storage_remaining>
	</files>
  
  

Error Codes

Code Meaning
0Empty/missing request (no file or URL)
1Empty file
2File extension not allowed
3File type not allowed (detected format)
4File too large
5Storage error: could not allocate a storage server
6Not a valid image
7Database error
8Storage error: could not move the file to storage
10Forbidden host (URL upload)
11File upload error (HTTP/PHP)
12Cannot fetch the URL (URL upload)
13Cannot save to temporary folder (URL upload)
15Uploaded data lost — retry the upload (resumable)
40Storage limit exceeded for your account
223Maximum upload limit reached
503Uploader temporarily disabled
Note: Error codes might change in the future, when we migrate to a new backend. Use only the text status to handle errors.