Skip to main content
This guide walks you through submitting a shelf photo, waiting for results, and reading the structured product data.
Prefer the CLI? Install it with npm install -g @shelfforce/cli, run sf login, then sf run <image>. See the CLI guide for details.

Prerequisites

  • A Shelfforce account (sign up here)
  • An API key with write permissions

How the analysis flow works

Shelf analysis is asynchronous. When you submit an image, Shelfforce queues it for processing and immediately returns an analysis ID. You then retrieve the results once processing completes.
There are two ways to know when results are ready: This quickstart uses polling. For webhooks, see the Webhooks guide.
1

Get your API key

Navigate to Settings > API Keys in the Shelfforce dashboard. Click Create API Key, give it a name, and select the write role.Copy the key immediately — it is only shown once.Your key will look like this:
Store your API key securely. Never commit it to source control or expose it in client-side code.
2

Submit an image for analysis

Send a POST request to the analyses endpoint with the URL of a shelf image. The response comes back immediately with status: "processing" — the analysis runs in the background.
The response includes an analysis ID and an initial status of processing:
One credit is consumed per analysis. See Credits for details.
3

Poll for results

Analysis typically completes in 10-30 seconds depending on image complexity. Poll the analysis endpoint until the status changes to completed:
For production use, set up webhooks to receive a notification when analysis completes instead of polling. Webhooks are more efficient and eliminate wasted requests.
4

View detected products

Once the status is completed, the response includes a products array with every detected item:
Each product includes:
5

Next steps

You have successfully analyzed your first shelf image. Here is where to go next:

Shelf Analysis Guide

Deep dive into the analysis pipeline and all available fields.

Batch Analysis

Process up to 20 images in a single request.

Webhooks

Get notified when analyses complete instead of polling.

Field Operations

Create tasks and manage stores for field team workflows.