Bulk Update Metadata
curl --request POST \
--url https://api.imperial.gay/images/bulk-metadata \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
],
"folderId": {},
"tags": [
"<string>"
],
"mode": "<string>"
}
'import requests
url = "https://api.imperial.gay/images/bulk-metadata"
payload = {
"ids": ["<string>"],
"folderId": {},
"tags": ["<string>"],
"mode": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>'], folderId: {}, tags: ['<string>'], mode: '<string>'})
};
fetch('https://api.imperial.gay/images/bulk-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.imperial.gay/images/bulk-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
],
'folderId' => [
],
'tags' => [
'<string>'
],
'mode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.imperial.gay/images/bulk-metadata"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"folderId\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.imperial.gay/images/bulk-metadata")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ],\n \"folderId\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.imperial.gay/images/bulk-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ],\n \"folderId\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"updated": 123
}Endpoints
Bulk Update Metadata
Move uploads between folders and/or update tags in bulk
POST
/
images
/
bulk-metadata
Bulk Update Metadata
curl --request POST \
--url https://api.imperial.gay/images/bulk-metadata \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
],
"folderId": {},
"tags": [
"<string>"
],
"mode": "<string>"
}
'import requests
url = "https://api.imperial.gay/images/bulk-metadata"
payload = {
"ids": ["<string>"],
"folderId": {},
"tags": ["<string>"],
"mode": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>'], folderId: {}, tags: ['<string>'], mode: '<string>'})
};
fetch('https://api.imperial.gay/images/bulk-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.imperial.gay/images/bulk-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
],
'folderId' => [
],
'tags' => [
'<string>'
],
'mode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.imperial.gay/images/bulk-metadata"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"folderId\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.imperial.gay/images/bulk-metadata")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ],\n \"folderId\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.imperial.gay/images/bulk-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ],\n \"folderId\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"updated": 123
}Request
Headers
string
required
Your API key in the format:
Bearer imperial_live_xxxxxxxxxxxxxBody
string[]
required
Array of upload IDs to update
string|null
Destination folder ID. Use
null to move items to Root.string[]
Tags to apply (normalized to lowercase)
string
default:"replace"
Tag mode:
replace, add, or removeResponse
number
Number of uploads updated
Example
curl -X POST "https://api.imperial.gay/images/bulk-metadata" \
-H "Authorization: Bearer imperial_live_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"ids": ["6987cd047baba11ee0f66d98"],
"folderId": "6985a036b35713a65e17ccbd",
"tags": ["work", "2026"],
"mode": "add"
}'
⌘I

