Integrate our automated photo editing software into your application.

To access and use our API you must register for an API key.

There is no cost to get an API key or for using the service.

Register for an API key today.

Signup for APIDocumentation

Getting started guide

1. Setup

Before using the API, you must register for an API key.

Click here to register for an API key

2. Uploading your first image

Upload an image to our API in two stages. First, you must request a signed S3 URL, then upload the image to the signed s3. (This is AWS recommend way of uploading to a serverless API stack: https://aws.amazon.com/blogs/compute/uploading-to-amazon-s3-directly-from-a-web-or-mobile-application).

To upload the image, you will need to make a POST request to https://api.autoenhance.ai/v2/image

  image_name: "house.jpg", //name of image
  contentType: "image/jpeg" //mime file type

  order_id: "b1aa3999-7908-45c9-9a99-82e25cf5de8e" //uuid string

If you have made a successful request, you'll get a 200 status code and a response body similar to this;

  order_id: "b1aa3999-7908-45c9-9a99-82e25cf5de8e",
  image_id: "0e53fb15-5ca2-4757-b631-14294cafd0ea",
  image_type: "jpeg",
  s3PutObjectUrl: "https://autoenhanceapi-prod.s3.eu-west-1.amazonaws.com/0e53fb15-5ca2-4757-b631-14294cafd0ea/original.jpeg"

Note that your image file has not been uploaded to our service yet. We’ll provide you with a signed S3 endpoint for uploading your image, called "s3PutObjectURL".

To upload your image to our service, make a PUT request to s3PutObjectURL with the image as a buffer. You will receive a 200 success code and an empty body confirming that you’ve uploaded the image successfully.

Once the image has been uploaded, our service will start enhancing your image.

3. Checking image has enhanced

Once your image has been uploaded to our service, you can check the status of the image by calling;

GET https://api.autoenhance.ai/v2/image/{image_id}

Image_id was provided when made your post request to /image in step 2.

If your image is being processed, the image status will be "processing". When an image has completed processing, the status will be "processed".

If you want to check a group of photos that all have the same order_id, you can call;

GET https://api.autoenhance.ai/v2/order/{order_id}

You can check individual images status or check the status of the whole order. If the order is processing, is_processing will be true. If it is complete, is_processing will be false.

4. Downloading/Viewing an image

When an image has finished processing, you can view the full resolution image with;

GET https://api.autoenhance.ai/v2/image/{image_id}/enhanced

These images are usually around 4-6Mb, which can take a long time to load on slow internet.

To view a low resolution, optimised for web image call;

GET https://api.autoenhance.ai/v2/image/{image_id}/enhance?size=small

This will display an image under 700kb.

You can either display these images as an src in an <img> element or download them to your cloud storage service.

5. Editing an image

If you’re unhappy with the look of your edited image, then you can make changes.

If you want to change the vertical correction, which makes crooked lines straight, then set vertical_correction: false, and the AI will disable this.

If the image should have a sky replacement, and it hasn’t been achieved by the AI, then you can set sky_replacement: true, and the AI will apply a sky replacement to the image. If the image shouldn’t have a sky replacement, but the AI has applied one, then you can set sky_replacement: false, to disable the sky replacement.

If you don’t like the sky in your enhanced image, then set change_sky: true, and the AI will pick out a different sky suitable for your image.

Variables should be set in a JSON object and request made to;

POST https://api.autoenhance.ai/v2/image/{image_id}/edit

  vertical_correction: true,
  sky_replacement: true,
  change_sky: true

The endpoint will respond with a status code 200 when the processing is complete, which should take under 10 seconds.

6. Review an image

We’re striving to improve the quality of enhancements every day but we need to know when the AI has done a good job or a bad job. Using our review endpoint provides us with the data to analyse the image we’ve enhanced.

Set a body request with rating: 1 if the AI has done a good job and rating: 0 if the AI has done a bad job too;

POST https://api.autoenhance.ai/v2/image/{image_id}/review

Need help integrating our API into your application?
Book a Call with our Tech Team
HomeAPIPricingBlogFAQEnhance ImageDashboard

© Copyright 2021, Autoenhance.ai. All Rights Reserved.