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.
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
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
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
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.
Whether to blur any faces or license plates in the image.
Enable the replacement of the original sky for a summer sky.
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/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