How to Add a File to Vector Store Collection

Updated on March 11, 2025

A collection file is a document that can be uploaded to a vector store collection, allowing you to batch-import structured data efficiently. Instead of adding individual items manually, collection files provide a way to store and manage multiple data points in a single upload.

Follow this guide to add a file 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 File endpoint to add a file to the target vector store collection.

    console
    $ curl "https://api.vultrinference.com/v1/vector_store/{collection-id}/files" \
        -X POST \
        -H "Authorization: Bearer ${INFERENCE_API_KEY}" \
        -H "Content-Type: multipart/form-data" \
        -F "file=@{path-to-your-file}"
    
  3. Send a GET request to the List Collection Files endpoint to list all files in the vector store collection.

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

Comments

No comments yet.