Reprocessing
This API endpoint allows you to reprocess any image you own. To reprocess an image, you must provide the image_id
and a valid API key.
const apiKey = "YOUR_API_KEY";
const imageId = "ID_OF_YOUR_IMAGE";
const preferences = {
ai_version: "4.x",
enhance: true,
enhance_type: 'neutral',
hdr: true
}
const processImage = async (imageId, apiKey, preferences) => {
const processImageResponse = await fetch(
`https://api.autoenhance.ai/v3/images/${imageId}/process`,
{
method: "PATCH",
headers: {
"Content-Type": "application/json",
"x-api-key": apiKey,
},
body: JSON.stringify({
...preferences
}),
}
);
const data = await processImageResponse.json();
}
The response after successfully editing or reprocessing an image will contain all the details of your image with the uploaded values.
Specification
The version of the AI model to use for enhancing the image. Versions ending in an .x will use the latest minor version as soon as it's published.
The type of clouds in the new sky to replace the original sky with. Options include: CLEAR, LOW_CLOUD, HIGH_CLOUD
Whether to enhance the image.
true
The type of enhancement to apply to the image. PROPERTY or PROPERTY_USA is used with AI version < 4.0, for >= 4.0 use WARM or NEUTRAL..
Correct any lens distortion in the image.
true
Whether to blur any faces or license plates in the image.
A rating between 0 and 5 on how good the image enhancmeent. Higher is better.
Enable the replacement of the original sky for a summer sky.
Whether the image is a 360 image.
Whether to upscale the image.
Correct any vertical distortion in the image so that it appears straight.
true
Whether to pull the windows in the image (used with AI version >= 4.0).
POST /v3/images/{id}/process HTTP/1.1
Host: api.autoenhance.ai
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 384
{
"ai_version": "latest",
"cloud_type": "CLEAR",
"enhance": true,
"enhance_type": "property",
"finetune_settings": {},
"image_name": "text",
"lens_correction": true,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"order_id": "text",
"privacy": true,
"rating": 1,
"sky_replacement": true,
"threesixty": true,
"upscale": true,
"vertical_correction": true,
"window_pull": true,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
{
"ai_version": "latest",
"cloud_type": "CLEAR",
"date_added": 1,
"downloaded": true,
"enhance": true,
"enhance_type": "property",
"finetune_settings": {},
"image_id": "123e4567-e89b-12d3-a456-426614174000",
"image_name": "text",
"lens_correction": true,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"order_id": null,
"privacy": true,
"rating": 1,
"scene": "text",
"sky_replacement": true,
"status": null,
"status_reason": null,
"upscale": true,
"user_id": null,
"vertical_correction": true,
"window_pull": true,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
Last updated