Skip to main content
Retrieves specific vectors from the index by their IDs. This method allows efficient retrieval of vectors and their metadata without performing similarity search.

Parameters

include defaults differ between endpoints: Get returns ["vector", "contents", "metadata"] by default, while Query returns [] (only Id).

Returns

  • *GetResponse: Retrieved vectors with requested fields
  • error: Any error encountered, including IDs not found

Error Handling

  • Returns error if the API request fails due to network connectivity issues
  • Returns error if authentication fails (invalid API key)
  • Returns error if the encryption key is invalid for the specified index
  • Returns error if there are internal server errors during retrieval
  • Returns error if the IDs slice is empty
  • Returns error if any ID is not found in the index
  • Returns error if the include parameter contains invalid field names

Example Usage

Response Item Fields