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.

Important note

All preferences that you don't specify will default to the previously set preferences of your image from the last time it was enhanced.

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

Process Image

post
Authorizations
Path parameters
idstringRequired
Body
ai_versionstring · enumOptional

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.

Possible values:
cloud_typestring · enum | nullableOptional

The type of clouds in the new sky to replace the original sky with. Options include: CLEAR, LOW_CLOUD, HIGH_CLOUD

Possible values:
enhancebooleanOptional

Whether to enhance the image.

Default: true
enhance_typestring · enumOptional

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..

Possible values:
finetune_settingsany ofOptional
object | nullableOptional
or
objectOptional
image_namestringOptional
lens_correctionbooleanOptional

Correct any lens distortion in the image.

Default: true
order_idstringOptional
privacyboolean | nullableOptional

Whether to blur any faces or license plates in the image.

ratinginteger · max: 5Optional

A rating between 0 and 5 on how good the image enhancmeent. Higher is better.

sky_replacementbooleanOptional

Enable the replacement of the original sky for a summer sky.

threesixtybooleanOptional

Whether the image is a 360 image.

upscalebooleanOptional

Whether to upscale the image.

vertical_correctionbooleanOptional

Correct any vertical distortion in the image so that it appears straight.

Default: true
window_pullboolean | nullableOptional

Whether to pull the windows in the image (used with AI version >= 4.0).

Other propertiesanyOptional
Responses
200
Successful response
application/json
post
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