Skip to main content
POST
Query Vectors (Binary)
Search for nearest neighbors in the encrypted index using binary-encoded query vectors for more efficient transfer of large batch queries.

Authentication

Required - API key via X-API-Key header:
You can get an API key from the CyborgDB Admin Dashboard. For more info, follow this guide.

Request Body

Response

The response format is the same as the standard query endpoint:

Exceptions

  • 401: Authentication failed (invalid API key) or wrong index_key on SDK-supplied indexes — see error model
  • 404: Index not found
  • 422: Invalid request parameters or vector dimensions
  • 500: Internal server error

Example Usage

The binary format is more efficient than the standard JSON query for large batch queries, as it avoids the overhead of encoding each float as a JSON number. The SDK clients automatically use this format when query vectors are passed as typed arrays (e.g., np.ndarray in Python, Float32Array in JS/TS).