Original
Original images are either original single-bracket or merged HDR image that you've uploaded. The only requirement for downloading original images is the image_id, you don't need an API key in order to be able to download the image.
const size = "big"
const downloadOriginalImage = async (imageId, size) => {
const response = await fetch(
`https://api.autoenhance.ai/v3/images/${imageId}/original${size ? size : ''}`,
{ method: "GET" }
);
const imageSource = await response.json()
return imageSource
}import requests
size = "big"
def download_original_image(image_id,size):
url = f'https://api.autoenhance.ai/v3/images/{image_id}/original{size if size else ""}'
response = requests.get(url)
image_source = response.json()
return image_source$image_id = "ID_OF_YOUR_IMAGE";
$size = "big";
function download_original_image($image_id, $size) {
$url = "https://api.autoenhance.ai/v3/images/$image_id/original" . ($size ? $size : '');
$options = array(
'http' => array(
'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/originalbig' \
-H 'Content-Type: application/json'Specification
Authorizations
Path parameters
idstringRequired
Query parameters
qualityinteger · min: 1 · max: 90Optional
Quality of the image, must be between 1 and 90.
formatstring · enumOptionalPossible values:
Format of the image, must be one of 'png', 'jpeg', or 'webp'.
previewbooleanOptional
Whether to show a lower quality preview version.
watermarkbooleanOptional
Whether to apply a watermark to the image.
finetunebooleanOptional
Whether to apply finetuning 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
/v3/images/{id}/originalGET /v3/images/{id}/original HTTP/1.1
Host: api.autoenhance.ai
x-api-key: YOUR_API_KEY
Accept: */*
binaryLast updated