Templates — API Reference
Package: dodil.k3.vector.v1 · Service: VectorService
ListTemplates here returns the vector-pillar template catalog — Scriptum templates whose category = embedding (server-pinned). Use the IDs returned here when calling AddVectorPipeline.
Same catalog, different filter as Pipelines → Templates and Tables → Templates. The Pipelines endpoint returns all templates; Vector pre-filters to
category=embedding; Tables pre-filters towarehouse_compatible=true.
| RPC | HTTP |
|---|---|
ListTemplates | GET /:bucket/vector/_templates |
gRPC setup —
grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.
What’s in the vector catalog
Each vector template ships as an index + search pair — you AddVectorPipeline with the _index variant; the matching _search variant runs query-side automatically when you Search against the resulting collection.
| Template (index) | Modality | Use case |
|---|---|---|
text_embedding_index | text, pdf, docx, html, audio, video | The canonical RAG ingest. Chunks + embeds documents. |
code_embedding_index | code (rust, python, javascript, typescript, go, java, c, cpp, …) | AST-aware chunking (tree-sitter) at function / class boundaries |
visual_embedding_index | image, video, audio, pdf | Multimodal — frames / spectrograms / page renders |
face_embedding_index | image | SCRFD detection + face embeddings |
object_embedding_index | image | Open-vocabulary object detection (requires labels template-input) |
Full descriptions live at Pipelines → Templates → The catalog.
ListTemplates
Request
HTTP
# All vector-pillar templates
curl -sS "https://k3.dev.dodil.io/kb-prod/vector/_templates" \
-H "Authorization: Bearer $DODIL_TOKEN"
# Free-text search
curl -sS "https://k3.dev.dodil.io/kb-prod/vector/_templates?search=code" \
-H "Authorization: Bearer $DODIL_TOKEN"
# Label filter — only image-modality templates
curl -sS "https://k3.dev.dodil.io/kb-prod/vector/_templates?labels[modality]=image" \
-H "Authorization: Bearer $DODIL_TOKEN"Response
HTTP
{
"templates": [
{
"id": "text_embedding_index",
"name": "Text Embedding Index",
"description": "Chunk + embed text/PDF/docx/HTML/audio/video into a Milvus collection.",
"tags": ["embedding", "text", "rag"],
"labels": {
"category": "embedding",
"type": "text",
"pipeline": "index",
"role": "index",
"modality": "text, pdf, docx, html, audio, video"
},
"category": "embedding",
"modalities": ["text", "pdf", "docx", "html", "audio", "video"],
"acceptedExtensions": ["pdf", "txt", "md", "docx", "html"],
"acceptedContentTypes": ["application/pdf", "text/plain", "text/markdown"]
}
]
}Using a template — the canonical flow
# 1. Browse — pick a template
dodil k3 vector templates -o json | jq '.templates[] | {id, modalities}'
# 2. Inspect its contract (what inputs does it require?)
dodil k3 template get text_embedding_index -o json | jq '.contract.inputs'
# 3. Create a vector collection bound to it
dodil k3 vector collection add docs -b kb-prod \
--template text_embedding_index \
--description "RAG corpus"
# 4. Upload a document — K3's auto-generated ingest rule fires
dodil k3 object create ./paper.pdf -b kb-prod -k papers/paper.pdf
# 5. Search
dodil k3 search "your query" -b kb-prod -c docsFor the full recipe (including the auto-generated rule, pipeline binding, multi-document ingest), see Recipes → Pipeline Collection.
See also
- Collections → AddVectorPipeline — how templates back collections
- Pipelines → Templates → The catalog — full descriptions of all 24 templates (incl. non-vector)
- Concepts → ScriptContract — the typed I/O contract carried on
contract - Recipes → Pipeline Collection — end-to-end worked example
- CLI Guide → vector templates —
dodil k3 vector templates grpcurlreference — full flag set + reflection-disabled fallbacks