How to Add an Item to Vector Store Collection

Updated on March 11, 2025

A collection item is a data point within a vector store collection, containing a unique identifier, associated metadata, and a vector representation (embedding) of the content. These embeddings capture the semantic meaning of the data, enabling fast and relevant retrieval that enhances tasks such as information generation and decision-making.

Follow this guide to add an item to a vector store collection on Vultr Serverless Inference using the Vultr API.

  1. Send a GET request to the List Collections endpoint and note the target collection's ID.

    console
    $ curl "https://api.vultrinference.com/v1/vector_store" \
        -X GET \ 
        -H "Authorization: Bearer ${INFERENCE_API_KEY}"
    
  2. Send a POST request to the Add Collection Item endpoint to add an item to the target vector store collection.

    console
    $ curl "https://api.vultrinference.com/v1/vector_store/{collection-id}/items" \
        -X POST \
        -H "Authorization: Bearer ${INFERENCE_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "content": "{text-to-be-embedded}",
            "description": "{brief-description-of-content}"
        }'
    
  3. Send a GET request to the List Collection Items endpoint to list all items in the vector store collection.

    console
    $ curl "https://api.vultrinference.com/v1/vector_store/{collection-id}/items" \
        -X GET \
        -H "Authorization: Bearer ${INFERENCE_API_KEY}"
    

Comments

No comments yet.