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: "3.x",
  enhance: true,
  enhance_type: 'property',
  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

POSThttps://api.autoenhance.ai//v3/images/{id}/process
Authorization
Path parameters
id*string
Body
ai_versionstring

The version of the AI model to use for enhancing the image.

brightness_boostnullable enum

The amount of brightness boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
brightness_boost_externalnullable enum

The amount of external brightness boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
brightness_boost_internalnullable enum

The amount of external brightness boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
clarity_levelnullable enum

The amount of clarity to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
cloud_typenullable enum

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

CLEARLOW_CLOUDHIGH_CLOUDnull
content_typestring

The MIME type of the image i.e. image/jpeg, image/png, etc.

contrast_boostnullable enum

The amount of contrast boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
contrast_boost_externalnullable enum

The amount of external contrast boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
contrast_boost_internalnullable enum

The amount of internal contrast boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
denoise_levelnullable enum

The amount of denoising to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
enhanceboolean

Whether to enhance the image.

enhance_typeenum

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, NEUTRAL, or AUTHENTIC.

propertyproperty_usawarmneutralauthentic
hdrboolean

Whether the image is a HDR bracket. An order_id must be provided when this is set to true.

image_namestring
lens_correctionboolean

Correct any lens distortion in the image.

order_idstring
privacynullable boolean

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

ratinginteger

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

saturation_levelnullable enum

The amount of saturation to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
sharpen_levelnullable enum

The amount of sharpening to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
sky_replacementboolean

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

threesixtyboolean

Whether the image is a 360 image.

vertical_correctionboolean

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

window_pullnullable boolean

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

Response

Successful response

Body
ai_versionstring

The version of the AI model to use for enhancing the image.

brightness_boostnullable enum

The amount of brightness boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
brightness_boost_externalnullable enum

The amount of external brightness boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
brightness_boost_internalnullable enum

The amount of external brightness boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
clarity_levelnullable enum

The amount of clarity to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
cloud_typenullable enum

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

CLEARLOW_CLOUDHIGH_CLOUDnull
contrast_boostnullable enum

The amount of contrast boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
contrast_boost_externalnullable enum

The amount of external contrast boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
contrast_boost_internalnullable enum

The amount of internal contrast boost to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
date_addedinteger

The date the image was registered with Autoenhance.

denoise_levelnullable enum

The amount of denoising to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
downloadedboolean

Whether image has been already downloaded and paid for.

enhanceboolean

Whether to enhance the image.

enhance_typeenum

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, NEUTRAL, or AUTHENTIC.

propertyproperty_usawarmneutralauthentic
enhancedboolean

Whether the image has been enhanced.

errorboolean

Whether the image has an error.

image_idstring (uuid)
image_namestring
image_typestring

The image type for the image.

is_threesixtyany

Whether the image is a 360° image

lens_correctionboolean

Correct any lens distortion in the image.

order_idstring
privacynullable boolean

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

ratinginteger

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

saturation_levelnullable enum

The amount of saturation to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
scenestring

The detected scene of the image i.e garden, patio, kitchen, etc.

sharpen_levelnullable enum

The amount of sharpening to apply to the image. Options include: NONE, LOW, MEDIUM, HIGH

NONELOWMEDIUMHIGHnull
sky_replacementboolean

Whether the sky replacement feature was enabled for the image.

statusenum

The status of the order.

waitingprocessingprocessederror
user_idstring

The user ID of the user who uploaded (owns) the image.

vertical_correctionboolean

Whether the vertical correction feature was enabled for the image.

window_pullnullable boolean

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

Request
const response = await fetch('https://api.autoenhance.ai//v3/images/{id}/process', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "ai_version": "text",
  "brightness_boost": "NONE",
  "brightness_boost_external": "NONE",
  "brightness_boost_internal": "NONE",
  "clarity_level": "NONE",
  "cloud_type": "CLEAR",
  "contrast_boost": "NONE",
  "contrast_boost_external": "NONE",
  "contrast_boost_internal": "NONE",
  "denoise_level": "NONE",
  "downloaded": false,
  "enhance": true,
  "enhance_type": "property",
  "enhanced": false,
  "error": false,
  "image_id": "123e4567-e89b-12d3-a456-426614174000",
  "image_name": "text",
  "image_type": "text",
  "lens_correction": true,
  "order_id": "text",
  "privacy": false,
  "saturation_level": "NONE",
  "scene": "text",
  "sharpen_level": "NONE",
  "sky_replacement": false,
  "status": "waiting",
  "user_id": "text",
  "vertical_correction": false,
  "window_pull": false
}

Last updated