Uploads
POST/uploads
Sends a photo once and returns an upload_id to use in any edit as "upload_id": "upl_…" or inside images[]. Useful when the same photo goes to several edits, or when it is too large for base64.
| Parameter | Description |
|---|---|
filerequiredfile | Multipart field: a JPEG, PNG or WebP image up to 12 MB. |
curl https://api.garmo.studio/v1/uploads \
-H "Authorization: Bearer $GARMO_API_KEY" \
-F "file=@dress-123.jpg"import os, requests
r = requests.post(
"https://api.garmo.studio/v1/uploads",
headers={"Authorization": f"Bearer {os.environ['GARMO_API_KEY']}"},
files={"file": open("dress-123.jpg", "rb")},
)
upload_id = r.json()["id"]import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("file", await openAsBlob("dress-123.jpg"), "dress-123.jpg");
const r = await fetch("https://api.garmo.studio/v1/uploads", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.GARMO_API_KEY}` },
body: form,
});
const { id } = await r.json();{
"id": "upl_4821_9f2c1e0a7b3d5e6f",
"object": "upload",
"size": 845211
}An upload belongs to your account and can only be used with your keys of the same mode. Uploads count as create requests for rate limits. An account can send up to 2,000 files a day with live keys and 50 with test keys (UTC days), counting uploads and images sent in requests.
Requests accept up to 40 MiB of body data, 12 MiB for an individual image, and 36 MiB of new image data total. Reuse upload IDs for larger batches. The daily file quota counts a new file when the request begins processing it, including attempts that later fail. An issued upload ID belongs to the account and its test or live mode.
Test upload IDs expire after 24 hours. Test jobs and their images are removed by scheduled cleanup.




