Skip to main content

Vision API

Vision is one POST for a single image. Put the histograms, gradients, textures, or keypoints in an application or a data pipeline. The unstructured key from Account → API keys covers Read and Vision. Send the file as multipart form data in the field file. JPEG and PNG are the formats the loader accepts.

Headers on both routes:

HeaderValue
X-api-keyUnstructured key
X-usernameYour Heimdall username

A missing username or key returns 404. An unreadable image returns 500 with detail Invalid Image Found.

Process​

POST https://vision.heimdallapp.org/vision/v1/api/process

curl -X POST 'https://vision.heimdallapp.org/vision/v1/api/process' \
-H 'X-api-key: YOUR_KEY' \
-H 'X-username: YOUR_USERNAME' \
-F 'file=@photo.jpg'
{
"filename": "photo.jpg",
"color_histograms": {
"red": [],
"green": [],
"blue": [],
"combined": []
},
"gradients": [],
"textures": []
}

filename is the uploaded file name. red, green, and blue are color histograms. combined is those three concatenated. gradients is a HOG vector. textures is an LBP vector. The arrays are numeric lists. Length depends on the extractor, so read it from a live response.

Features​

POST https://vision.heimdallapp.org/vision/v1/api/features

Same headers and the same file field.

{
"filename": "photo.jpg",
"angles": [],
"distances": [],
"descriptors": []
}

These are ORB keypoints: orientation angles, distances, and descriptors.

Bulk labeled images go through Lake zip ingest.