POST
/
vector_stores
/
{vector_store_id}
/
search
curl --request POST \
  --url https://api.openai.com/v1/vector_stores/{vector_store_id}/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "rewrite_query": false,
  "max_num_results": 10,
  "filters": {
    "type": "eq",
    "key": "<string>",
    "value": "<string>"
  },
  "ranking_options": {
    "ranker": "auto",
    "score_threshold": 0
  }
}'
{
  "object": "vector_store.search_results.page",
  "search_query": [
    "<string>"
  ],
  "data": [
    {
      "file_id": "<string>",
      "filename": "<string>",
      "score": 0.5,
      "attributes": {},
      "content": [
        {
          "type": "text",
          "text": "<string>"
        }
      ]
    }
  ],
  "has_more": true,
  "next_page": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

vector_store_id
string
required

The ID of the vector store to search.

Example:

"vs_abc123"

Body

application/json

Response

200 - application/json

OK

The response is of type object.