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 background

Endpoints

POST/api/compressFree

Smart compression for JPG, PNG, and WebP.

fileFileImage (multipart/form-data)
qualitynumberQuality 10-100 (default: 75)
POST/api/convertFree

Convert between JPG, PNG, WebP, and AVIF.

fileFileImage (multipart/form-data)
toqueryTarget format: webp | jpg | png | avif
qualityqueryQuality 10-100 (default: 90)
POST/api/resizeFree

Resize with aspect ratio or cover/contain fit.

fileFileImage (multipart/form-data)
wqueryWidth in pixels
hqueryHeight in pixels
fitquerycover | contain | inside (default: inside)
POST/api/ai/remove-background1 credit

Automatically remove backgrounds with AI.

fileFileImage (multipart/form-data)
POST/api/ai/upscale1 credit

Increase resolution by 2x/4x with AI.

fileFileImage (multipart/form-data)
scalenumber2 or 4 (default: 4)

Response Codes

200Success - response body is the processed image binary
401Missing or invalid access key
402Insufficient credits - upgrade your plan
400Invalid parameters or missing file
500Tool Updating

Ready to integrate?

Create your account, open the Dashboard, and generate your key in seconds.

Go to Dashboard →