Image sizes

What to know about photos: which ones work best, the limits, and the reference pictures that come back with a result.

Photos you send

For accurate detection, we recommend photos of 1600 × 1200 pixels in JPEG/JPG.

Larger photos may still work, but take longer and use more data without being more accurate. Smaller photos may give less accurate results. PNG, HEIC, WebP and AVIF are supported too, but formats other than JPEG/JPG may take longer to process.

PhotoRecommendedSupported
Dimensions1600 × 1200 pixels200 × 200 to 6000 × 6000 pixels
FormatJPEG/JPGJPEG/JPG, PNG, HEIC, WebP, AVIF
Upload sizeNo recommendationunder 10 MB for the whole upload
Aspect ratioNo recommendationall

When a photo is rejected

ProblemWhat happens
Larger than 6000 × 6000 pixelsRejected: “The resolution of the image was too high”
Smaller than 200 × 200 pixelsRejected: “The resolution of the image was too low”
Upload of 10 MB or moreRejected
Any other file formatRejected

For developers: the exact error answers

Too large (over 6000 × 6000 pixels):

{
  "location": ["body", "image"],
  "message": "The resolution of the image was too high; permitted: min: 200x200px, max: 6000x6000px.",
  "type": "value_error"
}

Too small (under 200 × 200 pixels):

{
  "location": ["body", "image"],
  "message": "The resolution of the image was too low; permitted: min: 200x200px, max: 6000x6000px.",
  "type": "value_error"
}

Reference pictures in the results

When the API finds one or more problems, each result links to a reference picture of a similar case. You can use it to compare with your own photo.

The picture is available in six widths:

SizeWidth
w10001000 pixels
w800800 pixels
w600600 pixels
w400400 pixels
w200200 pixels
w100100 pixels

To pick a width, change that part of the link. For example, for 800 pixels: https://<base_url>/visualsearch/w800/<image>.jpg

Example at w400:

Example reference picture at w400
We recommend that you do not hard-code the base URL (https://content.peat-cloud.com) in your app. It may change in the future. Instead, read the base URL from the link you get and build the rest of the path from it, for example like IOSched.

← All guides