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. Images
  2. Downloading Images

Enhanced

PreviousPreviewNextOrders

Last updated 11 months ago

Enhanced images are the final processed output from the AI. In order to download enhanced images, you need to have a paid subscription or a credit, API key, and the image_id.

Don't have any credits? Subscribe for a monthly plan, or top up in our .

Before you continue Enhanced images come in various resolutions. You can add a query parameter size into the request url in order to choose between small, large or big resolution. Don't want to specify the size? Simply don't include it in the URL, and we will default the download to the biggest resolution.

const apiKey = "YOUR_API_KEY";
const imageId = "ID_OF_YOUR_IMAGE";
const size = "big";

const downloadEnhancedImage = async (imageId, apiKey, size) => {
    const response = await fetch(
        `https://api.autoenhance.ai/v3/images/${imageId}/enhanced${size ? size : ''}`,
        { 
            method: "GET",
            headers: {
                "x-api-key": apiKey,
            },
        }
    );
    const imageSource = await response.json()
    
    return imageSource
}
import requests

api_key = "YOUR_API_KEY"
image_id = "ID_OF_YOUR_IMAGE"
size = "big"

def download_enhanced_image(image_id, api_key, size):
    url = f'https://api.autoenhance.ai/v3/images/{image_id}/enhanced{size if size else ""}'
    headers = {
        'x-api-key': api_key
    }
    response = requests.get(url, headers=headers)
    image_source = response.json()
    
    return image_source
$image_id = "ID_OF_YOUR_IMAGE";
$api_key = "YOUR_API_KEY";
$size = "big";

function download_enhanced_image($image_id, $api_key, $size) {
    $url = "https://api.autoenhance.ai/v3/images/$image_id/enhanced" . ($size ? $size : '');

    $options = array(
        'http' => array(
            'header'  => "Content-Type: application/json\r\n" .
                         "x-api-key: $api_key",
            'method'  => 'GET'
        )
    );

    $context = stream_context_create($options);
    $result = file_get_contents($url, false, $context);

    if ($result === FALSE) {
        return 'Error downloading image';
    }

    $image_source = json_decode($result, true);
    return $image_source;
}
curl -X GET \
  "https://api.autoenhance.ai/v3/images/YOUR_IMAGE_ID/enhancedbig" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY"

Specification

web application

Download Enhanced Image

get
Authorizations
Path parameters
idstringRequired
Query parameters
qualityinteger · min: 1 · max: 90Optional

Quality of the image, must be between 1 and 90.

formatstring · enumOptional

Format of the image, must be one of 'png', 'jpeg', or 'webp'.

Possible values:
previewbooleanOptional

Whether to show a lower quality preview version.

watermarkbooleanOptional

Whether to apply a watermark to the image.

max_widthinteger · min: 1Optional

Maximum width of the image in pixels. Must be a positive integer.

scalenumber · max: 1Optional

Scale factor for the image, must be between 0.0 and 1.0.

Responses
200
Successful response
image/jpeg
Responsestring · binary
401
Authentication error
application/json
404
Not found
application/json
422
Validation error
application/json
get
GET /v3/images/{id}/enhanced HTTP/1.1
Host: api.autoenhance.ai
x-api-key: YOUR_API_KEY
Accept: */*
binary
  • Specification
  • GETDownload Enhanced Image