Grouping Brackets

This API endpoint allows you to group/merge HDR brackets in your order. To group the brackets in the order, you must provide the order_id and a valid API key.

You can group your images by specific amount of brackets when using the property number_of_brackets_per_image, we will group you brackets based on a visual analysis if you don't specify the number of brackets.

const apiKey = "YOUR_API_KEY";
const orderId = "ID_OF_YOUR_ORDER";
const preferences = {
  ai_version: "3.x",
  enhance: true,
  enhance_type: 'property',
  hdr: true
}
const mergeOrder = async (apiKey,orderId, preferences) => {
    return await fetch(
      `https://api.autoenhance.ai/v3/orders/${orderId}/merge`,
      {
        method: "POST",
        headers: {
          "x-api-key": apiKey,
        },
        body: JSON.stringify({
          image_name: "your-image-name",
          contentType: "image/jpeg",
          ...preferences
        }),
      }
    );
}

Merging can take between 10 seconds to 5 minutes, depending on the number of brackets that need grouping. During this time, no images will show up when you try to retrieve your order.

Once a grouping has been completed all groups will show up when you retrieve your order, and the AI will start to merge HDRs and enhance them.

Specification

Merge HDR

Trigger merging of the brackets in the order.

POSThttps://api.autoenhance.ai//v3/orders/{id}/merge
Authorization
Path parameters
id*string
Body
ai_versionenum

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.

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

Correct any lens distortion in the image.

number_of_brackets_per_imageinteger

If provided then group into an image after every specified number of brackets, if not provided or set to 0 then we automatically group based on visual analysis.

privacynullable boolean

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

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.

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
any
Request
const response = await fetch('https://api.autoenhance.ai//v3/orders/{id}/merge', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "message": "text"
}

Last updated