Recognise objects within an image with great accuracy.
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.vision.object_detection({
"url": "https://jigsawstack.com/preview/object-detection-example-input.jpg",
"features": [
"object_detection"
],
"annotated_image": true,
"return_type": "url"
})
{
"success": true,
"annotated_image": "https://jigsawstack-temp.b1e91a466694ad4af04df5d05ca12d93.r2.cloudflarestorage.com/temp/93dca2d5-917b-4a6f-b1cf-70748c6d6bc1.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=7b9a19349842b7b1a9e4c2e19f05b232%2F20250826%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250826T233021Z&X-Amz-Expires=604800&X-Amz-Signature=cdb7856ef963f568648b18c7b321093d708f0e0ccc75b971b51196f76649e500&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject",
"objects": [
{
"bounds": {
"top_left": {
"x": 132,
"y": 54
},
"top_right": {
"x": 1389,
"y": 54
},
"bottom_left": {
"x": 132,
"y": 802
},
"bottom_right": {
"x": 1389,
"y": 802
},
"width": 1257,
"height": 748
},
"label": "TV"
},
{
"bounds": {
"top_left": {
"x": 435,
"y": 674
},
"top_right": {
"x": 694,
"y": 674
},
"bottom_left": {
"x": 435,
"y": 1021
},
"bottom_right": {
"x": 694,
"y": 1021
},
"width": 259,
"height": 347
},
"label": "Hands_0"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 627
},
"top_right": {
"x": 390,
"y": 627
},
"bottom_left": {
"x": 0,
"y": 994
},
"bottom_right": {
"x": 390,
"y": 994
},
"width": 390,
"height": 367
},
"label": "Hands_1"
},
{
"bounds": {
"top_left": {
"x": 108,
"y": 667
},
"top_right": {
"x": 592,
"y": 667
},
"bottom_left": {
"x": 108,
"y": 919
},
"bottom_right": {
"x": 592,
"y": 919
},
"width": 484,
"height": 252
},
"label": "Controller"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 93
},
"top_right": {
"x": 1440,
"y": 93
},
"bottom_left": {
"x": 0,
"y": 777
},
"bottom_right": {
"x": 1440,
"y": 777
},
"width": 1440,
"height": 684
},
"label": "Minecraft"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 134
},
"top_right": {
"x": 1440,
"y": 134
},
"bottom_left": {
"x": 0,
"y": 708
},
"bottom_right": {
"x": 1440,
"y": 708
},
"width": 1440,
"height": 574
},
"label": "Castle"
},
{
"bounds": {
"top_left": {
"x": 148,
"y": 483
},
"top_right": {
"x": 1291,
"y": 483
},
"bottom_left": {
"x": 148,
"y": 765
},
"bottom_right": {
"x": 1291,
"y": 765
},
"width": 1143,
"height": 282
},
"label": "Grass"
},
{
"bounds": {
"top_left": {
"x": 407,
"y": 407
},
"top_right": {
"x": 506,
"y": 407
},
"bottom_left": {
"x": 407,
"y": 455
},
"bottom_right": {
"x": 506,
"y": 455
},
"width": 99,
"height": 48
},
"label": "Water"
},
{
"bounds": {
"top_left": {
"x": 1155,
"y": 391
},
"top_right": {
"x": 1302,
"y": 391
},
"bottom_left": {
"x": 1155,
"y": 488
},
"bottom_right": {
"x": 1302,
"y": 488
},
"width": 147,
"height": 97
},
"label": "Trees"
}
],
"tags": [
"TV",
"Hands",
"Controller",
"Minecraft",
"Castle",
"Sky",
"Grass",
"Water",
"Trees",
"Table",
"Console",
"Wall"
],
"_usage": {
"input_tokens": 39,
"output_tokens": 565,
"inference_time_tokens": 9811,
"total_tokens": 10415
}
}
file_store_key
is specified.url
is
specified.object_detection
, gui
. Must contain at least one feature.url
, base64
.file_store_key
or url
can be provided not both.import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.vision.object_detection({
"url": "https://jigsawstack.com/preview/object-detection-example-input.jpg",
"features": [
"object_detection"
],
"annotated_image": true,
"return_type": "url"
})
{
"success": true,
"annotated_image": "https://jigsawstack-temp.b1e91a466694ad4af04df5d05ca12d93.r2.cloudflarestorage.com/temp/93dca2d5-917b-4a6f-b1cf-70748c6d6bc1.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=7b9a19349842b7b1a9e4c2e19f05b232%2F20250826%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250826T233021Z&X-Amz-Expires=604800&X-Amz-Signature=cdb7856ef963f568648b18c7b321093d708f0e0ccc75b971b51196f76649e500&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject",
"objects": [
{
"bounds": {
"top_left": {
"x": 132,
"y": 54
},
"top_right": {
"x": 1389,
"y": 54
},
"bottom_left": {
"x": 132,
"y": 802
},
"bottom_right": {
"x": 1389,
"y": 802
},
"width": 1257,
"height": 748
},
"label": "TV"
},
{
"bounds": {
"top_left": {
"x": 435,
"y": 674
},
"top_right": {
"x": 694,
"y": 674
},
"bottom_left": {
"x": 435,
"y": 1021
},
"bottom_right": {
"x": 694,
"y": 1021
},
"width": 259,
"height": 347
},
"label": "Hands_0"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 627
},
"top_right": {
"x": 390,
"y": 627
},
"bottom_left": {
"x": 0,
"y": 994
},
"bottom_right": {
"x": 390,
"y": 994
},
"width": 390,
"height": 367
},
"label": "Hands_1"
},
{
"bounds": {
"top_left": {
"x": 108,
"y": 667
},
"top_right": {
"x": 592,
"y": 667
},
"bottom_left": {
"x": 108,
"y": 919
},
"bottom_right": {
"x": 592,
"y": 919
},
"width": 484,
"height": 252
},
"label": "Controller"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 93
},
"top_right": {
"x": 1440,
"y": 93
},
"bottom_left": {
"x": 0,
"y": 777
},
"bottom_right": {
"x": 1440,
"y": 777
},
"width": 1440,
"height": 684
},
"label": "Minecraft"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 134
},
"top_right": {
"x": 1440,
"y": 134
},
"bottom_left": {
"x": 0,
"y": 708
},
"bottom_right": {
"x": 1440,
"y": 708
},
"width": 1440,
"height": 574
},
"label": "Castle"
},
{
"bounds": {
"top_left": {
"x": 148,
"y": 483
},
"top_right": {
"x": 1291,
"y": 483
},
"bottom_left": {
"x": 148,
"y": 765
},
"bottom_right": {
"x": 1291,
"y": 765
},
"width": 1143,
"height": 282
},
"label": "Grass"
},
{
"bounds": {
"top_left": {
"x": 407,
"y": 407
},
"top_right": {
"x": 506,
"y": 407
},
"bottom_left": {
"x": 407,
"y": 455
},
"bottom_right": {
"x": 506,
"y": 455
},
"width": 99,
"height": 48
},
"label": "Water"
},
{
"bounds": {
"top_left": {
"x": 1155,
"y": 391
},
"top_right": {
"x": 1302,
"y": 391
},
"bottom_left": {
"x": 1155,
"y": 488
},
"bottom_right": {
"x": 1302,
"y": 488
},
"width": 147,
"height": 97
},
"label": "Trees"
}
],
"tags": [
"TV",
"Hands",
"Controller",
"Minecraft",
"Castle",
"Sky",
"Grass",
"Water",
"Trees",
"Table",
"Console",
"Wall"
],
"_usage": {
"input_tokens": 39,
"output_tokens": 565,
"inference_time_tokens": 9811,
"total_tokens": 10415
}
}
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.vision.object_detection({
"url": "https://jigsawstack.com/preview/object-detection-example-input.jpg",
"features": [
"object_detection"
],
"annotated_image": true,
"return_type": "url"
})
{
"success": true,
"annotated_image": "https://jigsawstack-temp.b1e91a466694ad4af04df5d05ca12d93.r2.cloudflarestorage.com/temp/93dca2d5-917b-4a6f-b1cf-70748c6d6bc1.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=7b9a19349842b7b1a9e4c2e19f05b232%2F20250826%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250826T233021Z&X-Amz-Expires=604800&X-Amz-Signature=cdb7856ef963f568648b18c7b321093d708f0e0ccc75b971b51196f76649e500&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject",
"objects": [
{
"bounds": {
"top_left": {
"x": 132,
"y": 54
},
"top_right": {
"x": 1389,
"y": 54
},
"bottom_left": {
"x": 132,
"y": 802
},
"bottom_right": {
"x": 1389,
"y": 802
},
"width": 1257,
"height": 748
},
"label": "TV"
},
{
"bounds": {
"top_left": {
"x": 435,
"y": 674
},
"top_right": {
"x": 694,
"y": 674
},
"bottom_left": {
"x": 435,
"y": 1021
},
"bottom_right": {
"x": 694,
"y": 1021
},
"width": 259,
"height": 347
},
"label": "Hands_0"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 627
},
"top_right": {
"x": 390,
"y": 627
},
"bottom_left": {
"x": 0,
"y": 994
},
"bottom_right": {
"x": 390,
"y": 994
},
"width": 390,
"height": 367
},
"label": "Hands_1"
},
{
"bounds": {
"top_left": {
"x": 108,
"y": 667
},
"top_right": {
"x": 592,
"y": 667
},
"bottom_left": {
"x": 108,
"y": 919
},
"bottom_right": {
"x": 592,
"y": 919
},
"width": 484,
"height": 252
},
"label": "Controller"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 93
},
"top_right": {
"x": 1440,
"y": 93
},
"bottom_left": {
"x": 0,
"y": 777
},
"bottom_right": {
"x": 1440,
"y": 777
},
"width": 1440,
"height": 684
},
"label": "Minecraft"
},
{
"bounds": {
"top_left": {
"x": 0,
"y": 134
},
"top_right": {
"x": 1440,
"y": 134
},
"bottom_left": {
"x": 0,
"y": 708
},
"bottom_right": {
"x": 1440,
"y": 708
},
"width": 1440,
"height": 574
},
"label": "Castle"
},
{
"bounds": {
"top_left": {
"x": 148,
"y": 483
},
"top_right": {
"x": 1291,
"y": 483
},
"bottom_left": {
"x": 148,
"y": 765
},
"bottom_right": {
"x": 1291,
"y": 765
},
"width": 1143,
"height": 282
},
"label": "Grass"
},
{
"bounds": {
"top_left": {
"x": 407,
"y": 407
},
"top_right": {
"x": 506,
"y": 407
},
"bottom_left": {
"x": 407,
"y": 455
},
"bottom_right": {
"x": 506,
"y": 455
},
"width": 99,
"height": 48
},
"label": "Water"
},
{
"bounds": {
"top_left": {
"x": 1155,
"y": 391
},
"top_right": {
"x": 1302,
"y": 391
},
"bottom_left": {
"x": 1155,
"y": 488
},
"bottom_right": {
"x": 1302,
"y": 488
},
"width": 147,
"height": 97
},
"label": "Trees"
}
],
"tags": [
"TV",
"Hands",
"Controller",
"Minecraft",
"Castle",
"Sky",
"Grass",
"Water",
"Trees",
"Table",
"Console",
"Wall"
],
"_usage": {
"input_tokens": 39,
"output_tokens": 565,
"inference_time_tokens": 9811,
"total_tokens": 10415
}
}