POST /accounts/{account_id}/vectorize/v2/indexes/{index_name}/query
Finds vectors closest to a given vector in an index.
Servers
- https://api.cloudflare.com/client/v4
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:
Default value: "none" |
topK |
Number | No |
The number of nearest neighbors to find. Default value: 5 |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.