Skip to main content

Process V1 API

Extract color, texture, and gradient details from your images.

Endpoint Specifications

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

Request Headers

  • x-api-key - API key that is issued when the endpoint is configured.
  • x-username - Username associated with your account.
tip

All request headers are required.

Lost Key

API Keys are issued one time and cannot be retrieved. If you lose your API key, please disable the endpoint in the vision page and reconfigure to get a new API key.

Request Body

  • file - The image file you want to analyze
warning

Valid images formats: .JPEG, .PNG, .GIF, .BMP, and .TIFF

Response Object

  • filename - The name of the file passed in

  • color_histograms - A dictionary with three sub dictionaries: red, green, blue, combined. These sub dictionaries represent the color histograms of the image binned into 31 buckets.

  • gradients - Returns a histogram of oriented gradients for the image

  • texture - Retruns a texture pattern probability can be summarised into a histogram

Vision response object
{
"filename": "dog.jpeg",
"color_histograms": {
"red": [
1,
5,
4,
13,
12,
10,
14,
16,
31,
20,
30,
38,
77,
150,
376,
610,
761,
703,
839,
909,
1118,
1483,
961,
258,
216,
224,
259,
234,
218,
195,
145,
70
],
"green": [
1,
5,
10,
12,
17,
19,
24,
34,
30,
30,
63,
62,
118,
125,
220,
347,
635,
891,
890,
843,
682,
510,
740,
1140,
1507,
773,
77,
62,
59,
46,
24,
4
],
"blue": [
4,
5,
23,
29,
59,
95,
184,
364,
637,
970,
1111,
1026,
974,
821,
673,
889,
1183,
441,
76,
55,
51,
44,
41,
46,
47,
52,
37,
33,
18,
8,
4,
0
],
"combined": [
1,
5,
4,
13,
12,
10,
14,
16,
31,
20,
30,
38,
77,
150,
376,
610,
761,
703,
839,
909,
1118,
1483,
961,
258,
216,
224,
259,
234,
218,
195,
145,
70,
1,
5,
10,
12,
17,
19,
24,
34,
30,
30,
63,
62,
118,
125,
220,
347,
635,
891,
890,
843,
682,
510,
740,
1140,
1507,
773,
77,
62,
59,
46,
24,
4,
4,
5,
23,
29,
59,
95,
184,
364,
637,
970,
1111,
1026,
974,
821,
673,
889,
1183,
441,
76,
55,
51,
44,
41,
46,
47,
52,
37,
33,
18,
8,
4,
0
]
},
"gradients": [
0.094623997622785,
0.09709568267504787,
0.15345029897024143,
0.1801454204988457,
0.163728331135532,
0.09183184808176381,
0.11733740217057649,
0.05740750360048066,
0.05523401151037454,
0.11033513742562054,
0.08025379964470608,
0.13643727218182508,
0.1502691294755623,
0.1890841514022825,
0.14361480569733426,
0.12987875019555534,
0.059127710521059335,
0.11566072327867122,
0.21816296738086796,
0.19491093512345056,
0.16407079569084326,
0.1738242962264418,
0.21816296738086796,
0.19482035008547102,
0.1842340927388338,
0.17845542826194488,
0.18218831079901532,
0.21816296738086796,
0.20493765429672833,
0.13386082125469248,
0.21816296738086796,
0.21816296738086796,
0.21816296738086796,
0.21816296738086796,
0.21816296738086796,
0.21816296738086796
],
"textures": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0
]
}
422 Unprocessable Entity

You will receieve a 422 error your request body structure is incorrect.

Sample Request

Use the below sample request in Python to get started.

warning

You need to fill in your specific header values.

Python Request
import requests

url = 'https://vision.heimdallapp.org/vision/v1/api/process'
headers = {
'X-api-key': 'YOUR-API-KEY',
'X-username': 'YOUR-USERNAME',
}

files = {
'file': ('image.jpg', open('/Users/joelreji/Desktop/dog.jpeg', 'rb'), 'image/jpeg')
}

response = requests.post(url, headers=headers, json=data)