Vector Operations
Upsert records
Upsert records into a namespace. If a new value is upserted for an existing record ID, it will overwrite the previous value.
For guidance, examples, and limits, see Upsert data.
post/vectors/upsert
Headers
X-Pinecone-Api-Versionstring required
Required date-based version header
Request body
Example request
{
"vectors": [
{
"id": "example-vector-1",
"values": [
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8
],
"sparseValues": {
"indices": [
1,
312,
822,
14,
980
],
"values": [
0.1,
0.2,
0.3,
0.4,
0.5
]
},
"metadata": {
"genre": "documentary",
"year": 2019
}
}
],
"namespace": "example-namespace"
}Response
A successful response.
Example response
{
"upsertedCount": 2
}