Vector examples
← All examples7 working vector-search examples. Insert embeddings, search by every distance metric, switch between fast and high-recall mode, and restrict searches with metadata filters. Each example is its own page with the schema, the request in cURL + Python + TypeScript + Go, the response shape, and notes on common mistakes.
All vectors live on the runtime endpoint POST /v1/tenants/:t/vector/:table - they're not declared on the row schema. The id field is what links a vector back to a row (use the row's primary key).
Save one vector under an ID. The simplest write.
Attach arbitrary tags to each vector so you can later filter searches on them.
The default metric for text embeddings (OpenAI, Cohere, BGE, E5).
Euclidean distance. Use when the absolute magnitude of vectors carries signal.
Inner product. Use when your embeddings are already unit-normalised.
Trade some recall for ~3x faster results. Useful when latency matters more than perfect ranking.
Restrict the search to vectors whose metadata matches a filter. Applied during search, not after.