Skip to main content
POST
/
api
/
v1
/
search
/
semantic
Semantic search (RAG)
curl --request POST \
  --url https://api.kupe.in/api/v1/search/semantic \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "refund policy",
  "limit": 8,
  "similarity_threshold": 0.55
}
'
{
  "success": true,
  "message": "<string>",
  "data": [
    "<string>"
  ],
  "scores": [
    "<unknown>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://kupe.in/docs/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

agent_id
string<uuid>
required

Body

application/json
query
string
required
limit
integer
default:10
similarity_threshold
number
default:0.5

Response

Chunk texts + numeric scores (cosine distance; lower = more similar when returned).

Returned by POST /api/v1/search/semantic and POST /api/v1/search/hybrid. data is chunk text strings. scores: semantic returns a parallel list of numeric distances; hybrid returns objects { combined_score, distance, sparse_score } per chunk.

success
boolean
message
string
data
string[]

Matching chunk texts

scores
any[]

Parallel to data — numbers (semantic) or score objects (hybrid).