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
}),
}
);
}
import requests
api_key = "YOUR_API_KEY"
order_id = "ID_OF_YOUR_ORDER"
preferences = {
"ai_version": "3.x",
"enhance": True,
"enhance_type": "property",
"hdr": True
}
def merge_order(api_key, order_id, preferences):
url = f"https://api.autoenhance.ai/v3/orders/{order_id}/merge"
headers = {
"x-api-key": api_key,
"Content-Type": "application/json"
}
body = {
"image_name": "your-image-name",
"contentType": "image/jpeg",
**preferences
}
response = requests.post(url, headers=headers, data=json.dumps(body))
return response
$api_key = "YOUR_API_KEY";
$order_id = "ID_OF_YOUR_ORDER";
$preferences = array(
"ai_version" => "3.x",
"enhance" => true,
"enhance_type" => "property",
"hdr" => true
);
function merge_order($api_key, $order_id, $preferences) {
$url = "https://api.autoenhance.ai/v3/orders/$order_id/merge";
$options = array(
'http' => array(
'header' => "Content-Type: application/json\r\n" .
"x-api-key: $api_key",
'method' => 'POST',
'content' => json_encode($preferences)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
return 'Error merging order';
}
return $result;
}
curl -X POST \
'https://api.autoenhance.ai/v3/orders/YOUR_ORDER_ID/merge' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"ai_version": "3.x",
"enhance": true,
"enhance_type": "property",
"hdr": true,
"image_name": "your-image-name",
"contentType": "image/jpeg"
}'
Specification
Last updated