Autoenhance.ai
  • Overview
  • Getting Started
    • Obtaining an API key
    • Quickstart
      • Single Image
      • HDR Brackets
    • Code Examples
      • JavaScript
        • Uploading Single Bracket
        • Uploading HDR
        • Uploading 360
      • API Integrations Repository
  • SDKs
    • Web (Beta)
      • Changelog
    • JavaScript
      • Changelog
    • Python
      • Changelog
  • File & Camera Guidelines
    • File Formats
    • Metadata
    • 360
    • Lens Correction
  • Images
    • Managing Images
      • Creating & Uploading
      • Reprocessing
      • Retrieveing
      • Deleting
      • Reporting
    • Settings
      • Enhancement Style
      • Sky Replacement
      • Lens Correction
      • Vertical Correction
      • Window Pull
      • Auto Privacy
      • Usage Example
    • Downloading Images
      • Original
      • Preview
      • Enhanced
  • Orders
    • Managing Orders
      • Creating
      • Editing
      • Retrieving
      • Listing and Pagination
      • Deleting
    • Grouping Brackets and Processing Orders
  • Webhooks
  • API Versions
  • AI Versions
  • Links
    • API Specification
    • Support
Powered by GitBook
On this page
  1. Orders

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
        }),
      }
    );
}
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

PreviousDeletingNextWebhooks

Last updated 3 days ago

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 .

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

retrieve your order
retrieve your order