Public API
Lumageni tools are available through a REST API. Requires an active account and access key. Basic tools are free, while AI tools debit credits from your account.
🔑 Authentication Required
All routes require a key generated in your Dashboard. Send it in the HTTP header:
Authorization: Bearer fp_your_key_here
Example - compress image (cURL)
curl -X POST https://lumageni.com/api/compress \ -H "Authorization: Bearer fp_your_key_here" \ -F "[email protected]" \ -F "quality=80" \ --output compressed-photo.jpg
Example - remove background with AI (Python)
import requests
with open("product.jpg", "rb") as f:
r = requests.post(
"https://lumageni.com/api/ai/remove-background",
headers={"Authorization": "Bearer fp_your_key_here"},
files={"file": f}
)
with open("product-no-background.png", "wb") as out:
out.write(r.content) # PNG with transparent backgroundEndpoints
POST
/api/compressFreeSmart compression for JPG, PNG, and WebP.
fileFileImage (multipart/form-data)qualitynumberQuality 10-100 (default: 75)POST
/api/convertFreeConvert between JPG, PNG, WebP, and AVIF.
fileFileImage (multipart/form-data)toqueryTarget format: webp | jpg | png | avifqualityqueryQuality 10-100 (default: 90)POST
/api/resizeFreeResize with aspect ratio or cover/contain fit.
fileFileImage (multipart/form-data)wqueryWidth in pixelshqueryHeight in pixelsfitquerycover | contain | inside (default: inside)POST
/api/ai/remove-background1 creditAutomatically remove backgrounds with AI.
fileFileImage (multipart/form-data)POST
/api/ai/upscale1 creditIncrease resolution by 2x/4x with AI.
fileFileImage (multipart/form-data)scalenumber2 or 4 (default: 4)Response Codes
200Success - response body is the processed image binary401Missing or invalid access key402Insufficient credits - upgrade your plan400Invalid parameters or missing file500Tool UpdatingReady to integrate?
Create your account, open the Dashboard, and generate your key in seconds.
Go to Dashboard →