Semantic vector search using EmbeddingGemma-300m. Generates a query embedding via EmbeddingGemma (port 11436), then searches pgvector story_parent and llm_parent chunks by cosine similarity.
Request Parameters
Field
Type
Required
Default
Description
query
string
Yes
—
Search text
file_uuid
string
No
—
File UUID to search within. If omitted, searches all files (global search)
Smart search with LLM re-ranking. First fetches candidate results via RRF (Reciprocal Rank Fusion) using the existing smart search, then uses an LLM (Gemma4 on port 8000) to re-rank candidates by relevance to the query.
Request Parameters
Field
Type
Required
Default
Description
query
string
Yes
—
Search text
file_uuid
string
No
—
File UUID to search within
limit
integer
No
10
Max results to return
Pipeline
1. smart_search → fetch N candidates (limit × 3, clamped 10-20)
2. LLM rerank → re-order by relevance using Gemma4
3. trim → return top `limit` results
Example
curl -s -X POST "$API/api/v1/search/llm-smart"\
-H "Content-Type: application/json"\
-H "X-API-Key: $KEY"\
-d '{"query": "two people having a conversation about business", "limit": 5}'
Response (200)
{"query":"two people having a conversation about business","results":[{"file_uuid":"d3f9ae8e471a1fc4d47022c66091b920","parent_id":1234,"scene_order":1234,"start_frame":5000,"end_frame":5200,"fps":24.0,"start_time":208.3,"end_time":216.7,"summary":"[208s-217s, 9s] Two people discussing project timeline...","similarity":0.72}],"page":1,"page_size":5,"strategy":"llm_reranked"}
Field
Type
Description
strategy
string
Always "llm_reranked" for this endpoint
results
array
Re-ranked search results (same format as smart search)
Fallback
If LLM reranking fails (model unavailable, timeout), falls back to RRF order without error.
Visual Search
Auth: Required
Scope: global / file-level
Search text chunks → find associated identities. Returns chunks where face detections overlap with text content.
Query Parameters
Field
Type
Required
Default
Description
q
string
Yes
—
Search text (ILIKE match)
file_uuid
string
No
—
Restrict to specific file. If omitted, searches all files (global search)
{"success":true,"total":5,"results":[{"file_uuid":"a6fb22eebefaef17e62af874997c5944","chunk_id":"llm_parent_..._256_270","start_time":256.256,"end_time":270.228,"text_content":"...lack of affection...","identity_id":9,"identity_name":"Audrey Hepburn","identity_source":"tmdb","trace_id":94}]}