Skip to main content
POST
/
v5
/
vector-stores
/
{vector_store_name}
/
upsert
Upsert Vectors
curl --request POST \
  --url https://api.egp.scale.com/v5/vector-stores/{vector_store_name}/upsert \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "vectors": [
    {
      "id": "<string>",
      "content": {
        "text": "<string>",
        "type": "text"
      },
      "metadata": {}
    }
  ]
}
'
{
  "success_count": 123,
  "failure_count": 123,
  "succeeded": [
    "<string>"
  ],
  "failed": [
    {
      "id": "<string>",
      "error": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Path Parameters

vector_store_name
string
required

The name of the vector store

Body

application/json

Request to upsert documents.

vectors
VectorDocumentRequest · object[]
required

Array of documents to upsert

Response

Successful Response

Response for batch insert/upsert operations.

success_count
integer
required

Number of successfully processed documents

failure_count
integer
required

Number of failed documents

succeeded
string[]

IDs of successfully processed documents

failed
FailedDocumentResponse · object[]

Failed documents with their error messages