Skip to content

/image endpoint

Use the /image endpoint to search your collection for a sample image. Discover relevant content in your collection based on the information in your images.

The examples below require the example dataset.

Find images with similar content to the indexed image id:111.


Shortened response:

  "responseHeader": {
    "status": 0,
    "QTime": 1
  "response": {
    "numFound": 7,
    "start": 0,
    "maxScore": 1,
    "numFoundExact": true,
    "docs": [
        "id": "111",
        "color_rerank": 2122542384654405000,
        "color_isolated": false,
        "color_palette_freq": [
        "color_palette_hex": [
        "color_names": [
        "score": 1

Open Flow in browser

Suggest variants & alternatives

Automatically suggest similar variants or alternatives to a selected image on a detail page.

Example UI with search results

Imagine the selected image is id:123. Find the three most similar images to the indexed image id=123 and ignore the query image itself.

Narrow down the suggestions with extra filters

You can easily restrict the suggested alternatives by adding further filter queries to your request (multiple fq params in one request are supported). For example

  • only suggest products from category living: fq=category:living or
  • only suggest higher-priced alternatives: fq=price:[100 TO *].

For automatic context setting, the concrete filter values should be taken from the document of the selected image.

Use web image to find similar products

You can easily use URLs of web images to search for similar products in your collection.

The query below searches for a Wilson basketball in your collection.


Open Flow in browser

As you can see in the results, Flow first returns identical products, then basketballs from different vendors, and finally other types of balls after there are no basketballs left in the collection. This is great because Flow automatically returns similar alternatives when the specific item is not available.

The query below searches for specific playing cards in your collection.


Open Flow in browser

Upload local image as search input

Use a local image and upload it as base64 encoded value of parameter to search for similar content in your collection.

The following snippet loads the image and scales it down to thumbnail size in memory before uploading it to Flow. This has two advantages:

  1. Python Pillow package supports many more image formats than the Java runtime used by Flow. By converting the image to png before uploading, you can easily handle a wide range of formats.
  2. Downscaling the image before uploading significantly speeds up processing for high-resolution images by minimizing I/O and decoding times.
import requests
import base64
from PIL import Image
from io import BytesIO

FLOW_URL = "http://localhost:8983/api/cores/my-collection"
# Load & scale to thumbnail size - HighRes images slow down IO tremendously
img =
img.thumbnail((400, 400))
# encode as in-memory png
bytes = BytesIO(), format='PNG')
base64_image = base64.b64encode(bytes.getvalue()).decode('utf-8')
payload = {'': base64_image}
# set empty logParamsList= to avoid logging huge log messages when uploading base64 images as parameters
rsp ="/image?logParamsList=", data=payload)
base64 --wrap=0 YOUR_FILE_PATH | \
curl --data-urlencode "" \
--url 'http://localhost:8983/api/cores/my-collection/image?logParamsList='