Templates — API Reference
Package: dodil.k3.pipeline.v1 · Service: PipelineService
Templates are catalog entries from Scriptum — the recipes new pipelines spawn from. K3 ships a production catalog of 24 audited templates across four categories. See Core Concepts → Template for the type signature.
| RPC | HTTP |
|---|---|
ListTemplates | GET /admin/templates |
GetTemplate | GET /admin/templates/:template_id |
gRPC setup —
grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.
The catalog
Every template below ships with K3, is production-grade, and is discoverable via ListTemplates. Labels show the template’s intended modalities and (where applicable) warehouse_compatible: true — meaning the template emits structured rows suitable for a warehouse destination.
Core analysis (8)
Domain-agnostic processing — classification, extraction, summarization. All warehouse-compatible: bind these to a Tables destination to land structured rows.
| Template | What it does | Modalities |
|---|---|---|
classification | Classify documents by type, topic, language, and sensitivity | text, pdf |
document_triage | Rapid intake triage — classify + extract entities | text, pdf, docx, html, email |
entity_pii_extraction | Extract structured entities and detect PII | text, pdf |
image_understanding | Image analysis — ML object detection + OCR + LLM vision reasoning | image |
ocr_extraction | Extract text from scanned / image-based documents | pdf, image |
sentiment_intent_analysis | Sentiment, intent, topics, urgency, toxicity | text, pdf |
summarization | Multi-level document summarization + keyword extraction | text, pdf, docx, html |
translation | Translate text to a target language (Seed-X PPO 7B) | text |
Embedding — index pipelines (5)
Ingestion-side embedding pipelines. Each indexes a modality into a Vector collection. Bind these as vector pipelines.
| Template | What it does | Modalities |
|---|---|---|
text_embedding_index | Resolves a source object → chunks → embeds → indexes. The canonical “ingest documents for RAG” pipeline. | text, pdf, docx, html, audio, video |
code_embedding_index | Code embedding with AST-aware chunking (tree-sitter) at function / class boundaries | code (rust, python, javascript, typescript, go, …) |
visual_embedding_index | Visual embedding (image, video frames, audio spectrograms, PDF page renders) | image, video, audio, pdf |
face_embedding_index | Per-bucket face indexing — SCRFD detect + embed | image |
object_embedding_index | Object indexing with open-vocabulary detection | image |
Embedding — search pipelines (5)
Query-side counterparts to the _index templates. These are usually run ad-hoc (via Vector search) rather than bound as ingest pipelines, but you can wire them as free pipelines when needed.
| Template | What it does |
|---|---|
text_embedding_search | Per-chunk text query → multi-vector embed → fan-out to N collections → merged ranked results |
code_embedding_search | Per-chunk code query → multi-vector embed → fan-out → merged results |
visual_embedding_search | Visual query (text or image) → embed once → search N collections → merge by (collection, artifact_id) |
face_embedding_search | Face query → detect → crop → embed once → search N collections in parallel |
object_embedding_search | Object query → embed → search N collections in parallel |
Vision (4)
Image / video / audio analysis. All warehouse-compatible.
| Template | What it does | Modalities |
|---|---|---|
audio_transcription | Transcribe with Whisper; optional speaker diarization + audio classification | audio, video |
code_intelligence | Source-code analysis — symbols, dependencies, architecture, docs | text |
object_detection | Detect objects in images / video keyframes (YOLOv8m) | image, video |
video_surveillance | Full video surveillance — object tracking + activity classification | video |
E-commerce (2)
Domain templates for commerce / marketplace use cases. Both warehouse-compatible.
| Template | What it does | Modalities |
|---|---|---|
product_catalog_enrichment | Product catalog enrichment from images and descriptions | image, text |
review_analysis | Customer review analysis — sentiment, toxicity, keyword extraction | text, pdf |
Some additional templates exist in an unaudited category (real-estate, IT-ops, telecom, insurance, engineering, media, …). They’re discoverable via
ListTemplatesbut not part of the production catalog — use at your own risk.
ListTemplates
Request
HTTP
All templates:
curl -sS "https://k3.dev.dodil.io/admin/templates" \
-H "Authorization: Bearer $DODIL_TOKEN"Filter by category:
curl -sS "https://k3.dev.dodil.io/admin/templates?category=embedding" \
-H "Authorization: Bearer $DODIL_TOKEN"Free-text search:
curl -sS "https://k3.dev.dodil.io/admin/templates?search=ocr" \
-H "Authorization: Bearer $DODIL_TOKEN"Response
HTTP
{
"templates": [
{
"templateId": "text_embedding_index",
"name": "Text Embedding Index",
"description": "Resolves a source object → chunks → embeds → indexes.",
"category": "embedding",
"labels": { "status": "ready", "modality": "text" }
}
]
}GetTemplate
Returns one template with its full typed ScriptContract (input fields, output schema, accepted modalities). K3 reads the contract server-side to validate caller-supplied options when spawning pipelines.
Request
HTTP
curl -sS "https://k3.dev.dodil.io/admin/templates/text_embedding_index" \
-H "Authorization: Bearer $DODIL_TOKEN"Response
A Template — see Core Concepts → Template.
Using templates in pipeline creation
When you create a pipeline you either reference an existing Scriptum script by name (scriptum_template) or spawn a fresh script from a template ID (spawn_from_template) — see CreatePipeline.
Common pairings:
| Goal | Template to use | Bind to destination |
|---|---|---|
| RAG ingest for PDFs / docs | text_embedding_index | a Vector collection |
| Code search across a repo | code_embedding_index | a Vector collection |
| Multimodal asset library | visual_embedding_index | a Vector collection |
| Extract entities + PII to a table | entity_pii_extraction | a Tables table |
| Triage incoming docs | document_triage | a Tables table |
| Transcribe meeting audio | audio_transcription | a Tables table |
| Object detection on uploaded images | object_detection | a Tables table |
| Sentiment dashboard | sentiment_intent_analysis | a Tables table |
For the “search” half of an embedding workflow (queries), use the matching _search template — typically run ad-hoc through Vector search, not bound as an ingest pipeline.
See also
- Pipelines — spawn pipelines from templates
- Core Concepts → Template — type signature
- Core Concepts → ScriptContract — the typed I/O contract on
GetTemplate - CLI Guide → template —
dodil k3 template list / get - Vector — destination for embedding pipelines
- Tables — destination for
warehouse_compatibletemplates grpcurlreference — full flag set + reflection-disabled fallbacks