Python
from actian_vectorai_client import VectorAIClient
import random
with VectorAIClient("localhost:6574") as client:
# Update vector for a point
new_vector = [random.gauss(0, 1) for _ in range(32)]
result = client.points.update_vectors(
"my_collection",
points=[{"id": 1, "vectors": new_vector}]
)
print("✓ Updated vector for point 1")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
await client.points.updateVectors('my_collection', [
{ id: 1, vectors: [0.9, 0.8, 0.7, 0.6] },
{ id: 2, vectors: [0.5, 0.4, 0.3, 0.2] },
]);
console.log('Updated vectors for points 1 and 2');
client.close();curl -X PUT "http://localhost:6575/collections/my_collection/points/vectors" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>' \
-d '{
"points": [
{
"id": 1,
"vectors": [0.9, 0.8, 0.7, 0.6]
}
]
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points/vectors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'points' => [
[
'id' => 1,
'vectors' => [
0.9,
0.8,
0.7,
0.6
]
],
[
'id' => 2,
'vectors' => [
0.5,
0.4,
0.3,
0.2
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:6575/collections/{collection_name}/points/vectors"
payload := strings.NewReader("{\n \"points\": [\n {\n \"id\": 1,\n \"vectors\": [\n 0.9,\n 0.8,\n 0.7,\n 0.6\n ]\n },\n {\n \"id\": 2,\n \"vectors\": [\n 0.5,\n 0.4,\n 0.3,\n 0.2\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:6575/collections/{collection_name}/points/vectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"points\": [\n {\n \"id\": 1,\n \"vectors\": [\n 0.9,\n 0.8,\n 0.7,\n 0.6\n ]\n },\n {\n \"id\": 2,\n \"vectors\": [\n 0.5,\n 0.4,\n 0.3,\n 0.2\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points/vectors")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"points\": [\n {\n \"id\": 1,\n \"vectors\": [\n 0.9,\n 0.8,\n 0.7,\n 0.6\n ]\n },\n {\n \"id\": 2,\n \"vectors\": [\n 0.5,\n 0.4,\n 0.3,\n 0.2\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.00060924,
"status": "ok",
"result": {
"operation_id": 0,
"status": "Completed"
}
}{
"status": {
"error": "Collection `my_collection` doesn't exist!"
},
"time": 123
}Points
Update vectors
Update vector data for existing points without modifying their payloads. This is useful when re-embedding content or correcting vector values.
PUT
/
collections
/
{collection_name}
/
points
/
vectors
Python
from actian_vectorai_client import VectorAIClient
import random
with VectorAIClient("localhost:6574") as client:
# Update vector for a point
new_vector = [random.gauss(0, 1) for _ in range(32)]
result = client.points.update_vectors(
"my_collection",
points=[{"id": 1, "vectors": new_vector}]
)
print("✓ Updated vector for point 1")import { VectorAIClient } from '@actian/vectorai-client';
const client = new VectorAIClient('localhost:6574');
await client.points.updateVectors('my_collection', [
{ id: 1, vectors: [0.9, 0.8, 0.7, 0.6] },
{ id: 2, vectors: [0.5, 0.4, 0.3, 0.2] },
]);
console.log('Updated vectors for points 1 and 2');
client.close();curl -X PUT "http://localhost:6575/collections/my_collection/points/vectors" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <admin-jwt-or-access-token>' \
-d '{
"points": [
{
"id": 1,
"vectors": [0.9, 0.8, 0.7, 0.6]
}
]
}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6575",
CURLOPT_URL => "http://localhost:6575/collections/{collection_name}/points/vectors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'points' => [
[
'id' => 1,
'vectors' => [
0.9,
0.8,
0.7,
0.6
]
],
[
'id' => 2,
'vectors' => [
0.5,
0.4,
0.3,
0.2
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:6575/collections/{collection_name}/points/vectors"
payload := strings.NewReader("{\n \"points\": [\n {\n \"id\": 1,\n \"vectors\": [\n 0.9,\n 0.8,\n 0.7,\n 0.6\n ]\n },\n {\n \"id\": 2,\n \"vectors\": [\n 0.5,\n 0.4,\n 0.3,\n 0.2\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:6575/collections/{collection_name}/points/vectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"points\": [\n {\n \"id\": 1,\n \"vectors\": [\n 0.9,\n 0.8,\n 0.7,\n 0.6\n ]\n },\n {\n \"id\": 2,\n \"vectors\": [\n 0.5,\n 0.4,\n 0.3,\n 0.2\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6575/collections/{collection_name}/points/vectors")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"points\": [\n {\n \"id\": 1,\n \"vectors\": [\n 0.9,\n 0.8,\n 0.7,\n 0.6\n ]\n },\n {\n \"id\": 2,\n \"vectors\": [\n 0.5,\n 0.4,\n 0.3,\n 0.2\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"usage": {
"hardware": null
},
"time": 0.00060924,
"status": "ok",
"result": {
"operation_id": 0,
"status": "Completed"
}
}{
"status": {
"error": "Collection `my_collection` doesn't exist!"
},
"time": 123
}Authorizations
Admin JWT or access token for authenticating requests to VectorAI DB.
Path Parameters
The name of the collection containing the points to update.
Body
application/json
Array of objects, each containing a point ID and the new vector.
Show child attributes
Show child attributes
Response
Vectors updated
Resource usage information for this request.
Show child attributes
Show child attributes
Time spent to process this request, in seconds.
Example:
0.00060924
Operation status. Returns ok on success.
Example:
"ok"
Operation result containing the status of the vector update.
Show child attributes
Show child attributes
⌘I