Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cyborg.co/llms.txt

Use this file to discover all available pages before exploring further.

Retrieves vectors from the encrypted index by their IDs, with options to specify which fields to include in the results.
index.get(ids, include=["vector", "contents", "metadata"])

Parameters

ParameterTypeDefaultDescription
idsList[str]-List of vector IDs to retrieve
includeList[str]["vector", "contents", "metadata"]Fields to include in the response

Returns

List[Dict] - List of dictionaries containing the requested vector data.
[
  {
    "id": str, # Vector identifier (always included)
    "vector": List[float], # Vector data (if included)
    "contents": str | bytes, # Vector contents (if included, returned as string or bytes depending on how it was stored)
    "metadata": Dict # Vector metadata (if included)
  },
  ...
]
The contents field is returned in its original format (string or bytes) as it was stored. String contents remain strings, and bytes contents remain bytes after decryption.

Exceptions

  • Throws if the API request fails due to network connectivity issues.
  • Throws if authentication fails (invalid API key).
  • Throws if the encryption key is invalid for the specified index.
  • Throws if there are internal server errors preventing the retrieval.
  • Throws if the ids parameter is null, undefined, or empty.
  • Throws if the include parameter contains invalid field names.

Example Usage

# Get vectors with all data
vector_ids = ['doc1', 'doc2', 'doc3']
results = index.get(vector_ids)

for item in results:
    print(f"ID: {item['id']}")
    print(f"Vector: {item['vector'][:5]}...")  # Show first 5 dimensions
    print(f"Content: {item.get('contents', 'N/A')}")
    print("---")