Skip to Content
We are live but in Staging 🎉
API ReferenceVectorService API

VectorService API

Package: dodil.k3.vector.v1

VectorService owns vector engine lifecycle, vector collections, search, and external vector writes.

What It Is For

  • Configure vector infrastructure per bucket.
  • Create collection definitions (template-driven or manual).
  • Execute dense/hybrid search queries.
  • Write/delete external pre-embedded vectors.

Endpoint Map

Engine

gRPC methodHTTP route
ConfigureEnginePOST /:bucket/vector
GetEngineGET /:bucket/vector
DeleteEngineDELETE /:bucket/vector
ListVBaseInstancesGET /admin/vbase-instances

Collections

gRPC methodHTTP route
AddVectorPipelinePOST /:bucket/vector/pipelines
AddVectorCollectionPOST /:bucket/vector/collections
ListCollectionsGET /:bucket/vector/collections
GetCollectionGET /:bucket/vector/collections/:collection_id
DeleteCollectionDELETE /:bucket/vector/collections/:collection_id

Search and Writes

gRPC methodHTTP route
SearchPOST /:bucket/vector/search
Search (compat)POST /:bucket/search/vector
InsertVectorsPOST /:bucket/vector/collections/:collection_id/vectors
UpsertVectorsPUT /:bucket/vector/collections/:collection_id/vectors
DeleteVectorsPOST /:bucket/vector/collections/:collection_id/vectors:delete

Key Arguments

Configure engine

FieldTypeRequiredPurpose
bucketstringyesBucket scope
modestringyesauto, external, or pick
vbase_endpointstringnoRequired for external mode
vbase_db_namestringnoRequired for external mode
vbase_portint32noExternal mode port
service_idstringnoExisting instance for pick mode

AddVectorPipeline (template-driven)

FieldTypeRequiredPurpose
bucketstringyesBucket scope
namestringyesCollection name
template_idstringyesScriptum template ID
descriptionstringnoOperator description
template_inputsmap<string,value>noContract-driven runtime inputs

AddVectorCollection (manual schema)

FieldTypeRequiredPurpose
bucketstringyesBucket scope
namestringyesCollection name
dimensionsint32yesVector dimension
distance_metricenumnoCOSINE default, or EUCLIDEAN, DOT_PRODUCT
embedding_typeenumnoFLOAT default; also binary/float16/bfloat16/int8
sparse_modeenumnoNONE, BM25, or EXTERNAL
embed_modelstringnoQuery-side embedding model hint

Search request

FieldTypeRequiredPurpose
bucketstringyesBucket scope
queryoneofyestext, vector, or s3_key
collection_namestringnoRestrict to one collection
top_kint32noMax result count (default 10)
min_scorefloatnoScore threshold
search_modeenumnoVECTOR, HYBRID, AUTO
rerankboolnoEnable reranker
include_contentboolnoInclude chunk text
include_highlightsboolnoInclude highlight snippets
pre_filterobjectnoMetadata filter tree
source_idsstring[]noRestrict by source IDs

External vector writes

These endpoints require collections in external mode (embedding_source=EXTERNAL).

VectorRecord key fields:

FieldTypeRequiredPurpose
idstringyesCaller-provided vector primary key
dense_*oneofyesDense payload matching collection embedding type
sparsesparse vectorconditionalRequired when sparse_mode=EXTERNAL
textstringconditionalUsed for BM25 sparse mode
metadatastructnoFilterable metadata

Examples

Configure auto engine

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/vector" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{"bucket":"kb-prod","mode":"auto"}'

Create pipeline-driven collection

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/vector/pipelines" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "name": "contracts-embeddings", "template_id": "object_embedding_index" }'

Search by text

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/vector/search" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "text": "termination clause notice period", "collection_name": "contracts-embeddings", "top_k": 8, "min_score": 0.2, "include_content": true }'

Upsert external vectors

curl -sS -X PUT "https://k3.dev.dodil.io/kb-prod/vector/collections/col_ext/vectors" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "collection_id": "col_ext", "vectors": [ { "id": "doc-1#chunk-1", "dense_float": {"values": [0.11, 0.52, 0.07]}, "metadata": {"source": "contracts", "year": 2026} } ] }'

Common Use Cases

  1. Build RAG retrieval with text search over chunked documents.
  2. Support external embedding pipelines that write vectors directly.
  3. Run hybrid retrieval with filters and reranking for enterprise search.

Next: TableService