POST /accounts/{account_id}/vectorize/v2/indexes/{index_name}/query

Finds vectors closest to a given vector in an index.

Servers

Path parameters

Name Type Required Description
index_name String Yes
account_id String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
vector[] Array Yes

The search vector that will be used to find the nearest neighbors.

filter Object No

A metadata filter expression used to limit nearest neighbor results.

returnValues Boolean No

Whether to return the values associated with the closest vectors.

Default value: false

returnMetadata String No

Whether to return no metadata, indexed metadata or all metadata associated with the closest vectors.

Possible values:

  • "indexed"
  • "none"
  • "all"

Default value: "none"

topK Number No

The number of nearest neighbors to find.

Default value: 5

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.