Get Vector
client.VectorStores.Vectors.Get(ctx, vectorID, params) (*VectorDocument, error)
GET/v5/vector-stores/{vector_store_name}/vectors/{vector_id}
Retrieve a single document by its unique ID.
Returns the document’s full content, metadata, and optionally its embedding vector. Use this endpoint for direct lookups when the exact document ID is known. For content similarity search, use the query endpoint.
Get Vector
package main
import (
"context"
"fmt"
"github.com/scaleapi/sgp-dev-go"
"github.com/scaleapi/sgp-dev-go/option"
)
func main() {
client := sgpdev.NewClient(
option.WithAPIKey("My API Key"),
option.WithAccountID("My Account ID"),
)
vectorDocument, err := client.VectorStores.Vectors.Get(
context.TODO(),
"vector_id",
sgpdev.VectorStoreVectorGetParams{
VectorStoreName: "vector_store_name",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", vectorDocument.ID)
}
{
"id": "id",
"content": {
"text": "text",
"type": "text"
},
"metadata": {
"foo": "bar"
},
"vector": [
0
]
}Returns Examples
{
"id": "id",
"content": {
"text": "text",
"type": "text"
},
"metadata": {
"foo": "bar"
},
"vector": [
0
]
}