Skip to main content
POST
Image Scan analyzes an uploaded image for malware, suspicious content, and embedded indicators.

Authentication

Send your API key as Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

Request

string
required
Set this value to image.
file
The image to scan, uploaded as multipart/form-data. Send this field or content_base64. When you omit filename, the uploaded file’s name is used.
string
For a JSON body, send this field or file. The base64-encoded image. Send raw base64 only. A data URL prefix such as data:image/png;base64, returns 400.
string
The original image file name. Encrata checks it against the real file type: a JPEG named .png sets image.extension_matches to false, and a name that hides an executable behind an image extension (photo.jpg.exe) raises a signal.
boolean
Set to true to include STIX 2.1 output when available. Defaults to false.

Supported images

The image can be up to 10 MB and 50 megapixels.

Example request

Upload the image from disk as multipart/form-data. Replace photo.jpg with the path to your image.
To send JSON instead, base64-encode the image into content_base64:

Example response

A scan of a camera photo that carries its camera details and GPS coordinates:
The photo is clean, and the info signal warns that its GPS coordinates reveal where it was taken.

How the verdict is decided

Encrata scans up to 3 links per image, each like a URL Scan:
  • Links read from text in the image (OCR), including ones written without https://, such as www.example.com/offer or example.com/path. They’re listed in ocr_urls as https:// links.
  • Links in QR codes and other codes in the image, also listed under codes.
  • Links in free-text metadata: comments, description, artist, copyright, and PNG text. These raise a metadata signal.
Every scanned link’s full result is in url_scans.

Image result fields

An image result has the common fields plus these.
integer
Credits this scan charged: 1, or 0 when you scanned the same image before.
object
format, width, height, size_bytes, detected_type (the real type, read from the file’s bytes), extension (from filename), extension_matches, and second_extension (a risky extension hidden before the last one).
object
md5, sha1, and sha256 of the uploaded bytes, and dhash, a perceptual hash that stays the same when the picture is resized or recompressed.
object
EXIF and PNG metadata, when the image has it.
object
The hidden-data analysis.
object
Data stored after the image’s end marker: type, offset, and size_bytes.
object
How well the picture could be analysed: blur_score, noise_level, brightness, contrast, megapixels, aspect_ratio, and issues (such as blurry or low_resolution). Absent when the pixels couldn’t be decoded.
string
The file type reported by the file scanner.
string
Text read from the image, up to 5,000 characters.
string[]
Links read from the text, as https:// links.
object[]
QR and other codes found in the image, in the same shape as a QR Code Scan codes item.
object[]
A full URL Scan result for each link found in the image’s text, codes, or metadata. Up to 3.
object[]
Every check the scan ran and whether it answered: file_type, image_structure, pixel_analysis, steganography, text_recognition, antivirus, detection_rules, embedded_content, and hash_reputation. See Checks and coverage.
object[]
What the scan observed. It always contains the image’s sha256, sha1, and md5 (with source set to upload), even when verdict is clean, plus URLs and hidden-file hashes found in the image. Send only entries whose role is threat to a blocklist. See IOCs.
See Malware Scan for the shared fields: assessment, recommended_action, confidence_reason, coverage, data_flow, and duration_ms.

Errors

Errors use the same envelope as successful responses, with success set to false. Branch on result.code. message is a sentence you can show to users. The response panel shows an example of each status. Errors aren’t charged.

Credits

A scan costs 1 credit. Scanning the same image again is free and returns credits: 0.