AI Search

The AI Search API provides semantic search capabilities — search by text description or find visually similar images.

circle-info

Requires AI Search Plugin. The AI Search features require the Eagle AI Search plugin to be installed and running. Use the status endpoints to check availability before performing searches.

Endpoints Overview

Method
Endpoint
Description

GET

/api/v2/aiSearch/isInstalled

Check if AI Search is installed

GET

/api/v2/aiSearch/isReady

Check if AI Search is ready

GET

/api/v2/aiSearch/isStarting

Check if AI Search is starting up

GET

/api/v2/aiSearch/isSyncing

Check if AI Search is syncing data

GET

/api/v2/aiSearch/getSyncStatus

Get detailed sync status

GET

/api/v2/aiSearch/checkServiceHealth

Check service health

POST

/api/v2/aiSearch/searchByText

Search by text description

POST

/api/v2/aiSearch/searchByBase64

Search by image (Base64)

POST

/api/v2/aiSearch/searchByItemId

Find similar items by item ID


Status Endpoints

GET /api/v2/aiSearch/isInstalled

Check whether the AI Search plugin is installed.

await fetch("http://localhost:41595/api/v2/aiSearch/isInstalled").then(r => r.json());

Response:


GET /api/v2/aiSearch/isReady

Check whether AI Search is fully initialized and ready to accept search queries.

Response:


GET /api/v2/aiSearch/isStarting

Check whether the AI Search service is currently starting up.

Response:


GET /api/v2/aiSearch/isSyncing

Check whether AI Search is currently syncing (indexing) library data.

Response:


GET /api/v2/aiSearch/getSyncStatus

Get detailed synchronization status, including progress information.

Response:


GET /api/v2/aiSearch/checkServiceHealth

Perform a health check on the AI Search service.

Response:


Search Endpoints

POST /api/v2/aiSearch/searchByText

Search for items using a natural language text description. The AI model finds visually or semantically matching items.

Request Body

  • query string (required) — Text description to search for

  • options Object (optional)

    • limit integer — Maximum number of results (default varies by AI Search config)

Response

Examples


POST /api/v2/aiSearch/searchByBase64

Find visually similar items by providing a Base64-encoded image.

Request Body

  • base64 string (required) — Base64-encoded image data

  • options Object (optional)

    • limit integer — Maximum number of results

Response

Same format as searchByText — returns an array of { item, score } results sorted by similarity.

Example


POST /api/v2/aiSearch/searchByItemId

Find items visually similar to an existing item in the library.

Request Body

  • itemId string (required) — The item ID to find similar items for

  • options Object (optional)

    • limit integer — Maximum number of results

Response

Same format as searchByText — returns an array of { item, score } results sorted by similarity.

Example


  1. Check availability — Call isInstalled and isReady before searching

  2. Wait if starting — If isStarting returns true, poll until isReady becomes true

  3. Check sync status — Use getSyncStatus to verify the index is up to date

  4. Search — Use searchByText for description-based search, searchByBase64 for reverse image search, or searchByItemId to find similar items

Last updated