For the complete documentation index, see llms.txt. This page is also available as Markdown.

Search

Search

post

Get relevant chunks from the collections and a query.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
collection_idsinteger[] · max: 100Optional

List of collections ID.

Default: []
document_idsinteger[] · max: 100Optional

List of document IDs

Default: []
metadata_filtersany of · nullableOptional

Metadata filters to apply to the search.

or
limitinteger · max: 100Optional

Number of results to return.

Default: 10
offsetintegerOptional

Offset for pagination, specifying how many results to skip from the beginning.

Default: 0
methodstring · enumOptional

Search method to use.

Default: semanticPossible values:
rff_kinteger · max: 16384Optional

Smoothing constant for Reciprocal Rank Fusion (RRF) algorithm in hybrid search (recommended: from 10 to 100).

Default: 60
score_thresholdnumber · max: 1Optional

Score of cosine similarity threshold for filtering results, only available for semantic search method.

Default: 0
querystring · min: 1 · nullableOptional

Query related to the search.

Other propertiesanyOptional
Responses
200

Successful Response

application/json
objectconst: listOptional

The type of the object.

Default: list
Other propertiesanyOptional
post/v1/search
POST /v1/search HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 264

{
  "collection_ids": [
    1
  ],
  "document_ids": [
    1
  ],
  "metadata_filters": {
    "key": "text",
    "type": "eq",
    "value": "text",
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "limit": 10,
  "offset": 0,
  "method": "semantic",
  "rff_k": 60,
  "score_threshold": 0,
  "query": "text",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}
{
  "object": "list",
  "data": [
    {
      "method": "hybrid",
      "score": 1,
      "chunk": {
        "object": "chunk",
        "id": 1,
        "collection_id": 1,
        "document_id": 1,
        "content": "text",
        "metadata": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "created": 1,
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Last updated

Was this helpful?