Skip to main content


A class for interfacing with the Vecto Index API.



async indexData(requestParameters: IndexDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexResponse>

Create an entry in the index for Image or Text data and store them in the provided vector space.


  • requestParameters (IndexDataRequest): Parameters for the index data request.
    • vectorSpaceId: The ID of the vector space to index in (required).
    • modality: The modality of the data.
    • attributes: Array of attributes.
    • input: Array of input data.
  • initOverrides (RequestInit or runtime.InitOverrideFunction): Overrides for the request initialization.


  • IndexResponse: Response of the index data operation.
    • status: Status of the index operation
    • ids: Array containing the unique IDs of the indexed data items.
import { Configuration, IndexApi, IndexDataRequest, Modality } from 'vecto-sdk'

const config = new Configuration({
accessToken: 'your-token'

const api = new IndexApi(config);

const textDataParams: IndexDataRequest = {
vectorSpaceId: 'your-vector-space-id',
modality: 'TEXT',
attributes: [JSON.stringify('sample metadata')],
input: [new Blob(['sample data to vectorize and ingest'])],

const responseText = await api.indexData(textDataParams);