🟢API for Images

This page contains description of images management via API.

Image is a data source object that is used by Algorithmsto extract information and convert it into knowledge (for example, the estimation of skin concerns)

What can you do?

You can find more details on these actions in the Images section of Swagger.

Upload

Generate signed URL for upload

When you've created a subject connected to your user, you can now request a signed URL to upload the image.

In the simplest case (uploading 1 frontal selfie to subject), you don't even need to send any extra payload in the body of this request.

After you've received response from this API method, you should take the key from response upload_url. It will contain following keys:

  • url — the URL where to upload your image

  • method — HTTP method that you should use for upload (PUT by default)

  • headersrequired headers to make an upload request

Also you need to save the response key image_batch_id to a variable in your code, it will be needed later. Batch is simply a grouping of images in one group. In the simplest case when you upload only selfies, it's just a group of 1 image.

Then you perform an upload request:

curl -X PUT {upload_url.url} \
  -H "Content-Type: application/octet-stream" \
  -H "X-Goog-Content-Length-Range: 1,31457280" \
  --upload-file {file_name}

Image requirements:

  • Minimum image resolution is 256x256 pixels.

  • Maximum resolution is not restricted, but remember - the heavier is the picture, the longer it's being processed.

  • Maximum image size is 30MB.

  • Optimal image size is an average modern smartphone selfie (3-5MB).

Send to computation

After the upload is done, you should send signal to SaaS API backend, that upload is complete and we should start processing your image by algorithms.

Use previously saved image_batch_id as a batch_id here. The request body can be empty.


List subject images

Note that you can access aux images (aux images API link) directly in this response.


Get image info

Note that you can access aux images (aux images API link) directly in this response.


Delete image

Last updated