For the complete documentation index, see llms.txt. This page is also available as Markdown.

Magic Enhancer ✨

The magic enhancer will enhance your photos contrast, exposure, color and brightness to make them more appealing. The Magic Enhancer also lets you fix the sky and hide people's faces or plates.

⚠️ Enhancer is a add-on of the Gepetto API billed separately, per request.

Endpoint

POST https://europe-west1-gepettoai.cloudfunctions.net/v1/enhancer

Headers

Name
Type
Description

Authorization*

String

Bearer {{API_KEY}}

Request Body

Name
Type
Description

sky_fix

Boolean (true / false)

(optional) Will change a grey sky to a blue sky.

auto_privacy

Boolean (true / false)

(optional) Will blur faces and car plates.

webhook

String

(optional) Webhook POST URL to send the result on completion. If not provided, the request will wait for the result.

{
  "base64": "<base64 encoded image>",
  "status": "success"
}
{
  "status": "pending",
  "id": "xxxxxxxxxxxxxx", // You can use that id with Get Job
  "mode": "enhance"
}

Code Examples

curl --location 'https://europe-west1-gepettoai.cloudfunctions.net/v1/enhancer' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
  "url": "https://firebasestorage.googleapis.com/v0/b/gepettoai.appspot.com/o/raw-images%2Ffd6db4d6-aaf6-4563-9340-c7c2b59fe69e.jpeg?alt=media&token=4d3b728a-5ebc-4a55-a694-1c21c580c8aa",
  "sky_fix": true,
  "auto_privacy": false,
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {{API_KEY}}");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: JSON.stringify({
    "url": "https://firebasestorage.googleapis.com/v0/b/gepettoai.appspot.com/o/raw-images%2Ffd6db4d6-aaf6-4563-9340-c7c2b59fe69e.jpeg?alt=media&token=4d3b728a-5ebc-4a55-a694-1c21c580c8aa",
    "sky_fix": true,
    "auto_privacy": false
  })
};

const response = await fetch("https://europe-west1-gepettoai.cloudfunctions.net/v1/enhancer", requestOptions)
const body = await reponse.json();
console.log(body)

Results

Last updated