Skip to main content

Vision image API

Two endpoints: visual features (/process) and keypoint features (/features).

Before you start

Unstructured API key. For labeled folders at scale, use Lake zip ingest.

Formats: JPEG / JPG / PNG.

Process (color, texture, gradients)

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

Headers: X-api-key, X-username
Body: multipart file

Response:

  • color_histograms.red / green / blue / combined
  • gradients (36 bins)
  • textures (26 bins)
import requests

url = "https://vision.heimdallapp.org/vision/v1/api/process"
headers = {"X-api-key": "YOUR-API-KEY", "X-username": "YOUR-USERNAME"}
with open("image.jpg", "rb") as f:
response = requests.post(url, headers=headers, files={"file": ("image.jpg", f, "image/jpeg")})
print(response.status_code, response.json().get("filename"))

Features (keypoints)

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

Same headers and file upload. Response: angles, distances, descriptors.

422

Invalid or corrupt image, wrong format, or missing headers.

Next