Grouping Brackets and Processing Orders

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}/process`,
      {
        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

Process Order

post

Triggers the grouping of any brackets contained in the order and process the final images in the order.

TODO: Ideally we use transactions to help deal with errors but it;s a pain with MongoEngine so need to do it as part of Django or other ORM

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:
lens_correctionbooleanOptional

Correct any lens distortion in the image.

Default: true
number_of_brackets_per_imageintegerOptional

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.

privacyboolean | nullableOptional

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

sky_replacementbooleanOptional

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

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

Responses
200
Successful response
application/json
post
POST /v3/orders/{id}/process HTTP/1.1
Host: api.autoenhance.ai
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 276

{
  "ai_version": "latest",
  "cloud_type": "CLEAR",
  "enhance": true,
  "enhance_type": "property",
  "images": [
    {
      "bracket_ids": [
        "text"
      ]
    }
  ],
  "lens_correction": true,
  "number_of_brackets_per_image": 1,
  "privacy": true,
  "sky_replacement": true,
  "upscale": true,
  "vertical_correction": true,
  "window_pull": true
}
{
  "created_at": "2025-06-27T09:51:47.306Z",
  "images": [
    {
      "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"
    }
  ],
  "is_deleted": true,
  "is_merging": true,
  "is_processing": true,
  "last_updated_at": "2025-06-27T09:51:47.306Z",
  "name": "text",
  "order_id": "text",
  "status": null,
  "total_images": 1
}

Last updated