Recognition Request
A recognition request has the following fields:
API field | Data type | Description | Example values | Required |
---|---|---|---|---|
device_id | string | The ID of the device making the recognition request. | DEVICE1, 123456 | Mandatory |
images | array of objects | An array of objects. | n/a | Mandatory |
camera_type | string | The type of camera the image was captured on. Must match one of the camera types the device has been registered with. | generic, MP7000-P, MP7000-L, 7879e-C3, TC1, TD0, TDI, SM6000 | Mandatory |
image | string | Base64 encoded .png or .jpeg image. For more information on image format, see Image format. | Too long to provide example | Mandatory |
capture_time | date-time | Time the image was captured, in ISO format. | 2024-01-04T12:30:45Z, 2025-07-15T12:30:00Z, 2028-12-01T23:55:00Z, 2030-03-14T15:20:15Z | Mandatory |
weight_grams | number | Weight of the product in grams. Used to improve results. | 150, 100.1 | Optional |
include_scores | boolean | Whether to include confidence scores in the response. Recommended for experienced users only. | true, false | Optional |
score_threshold | number | Custom confidence score threshold for the response. Can result in unexpected behaviour. Recommended for experienced users only. | 0.9, 0.8, 0.88 | Optional |
max_options | integer | Maximum options that can be displayed to the user. Default is 4 if omitted. | 1, 2, 3, 4, 5, 6 | Optional |
Here's how to make a recognition request using a Unix-like command-line interface:
curl --request POST --url <https://recognition.services.tiliter.com/recognition/> --header 'accept: application/json' --header 'content-type: application/json' --header 'tiliter-api-key: YOUR_API_KEY' --data ' { "images": [ { "camera_type": "TDI", "image": "BASE64_IMAGE", "capture_time": "2024-01-04T12:30:45Z" } ], "device_id": "DEVICE1"} '
The expected response to this is:
{ "id": "57355cd5-072c-45f3-84ba-255306ee961c", "product_recognition": { "result_type": "recognised", "options": [ { "product_id": "PRODUCT1", "quantity": null, "score": null } ] }, "bag_recognition": { "present": false } }
Updated 12 months ago