Templates — API Reference
Package: dodil.k3.tables.v1 · Service: TableService
ListTemplates here returns the Scriptum template catalog filtered to warehouse-compatible templates — templates tagged warehouse_compatible: true whose output schema can back a Delta table. Use the IDs returned here when calling CreateTablePipeline.
Same catalog, different filter: this is the same underlying Scriptum catalog as Pipelines → Templates → ListTemplates, but pre-filtered. The Pipelines endpoint returns all templates; this endpoint returns only those that emit structured rows.
| RPC | HTTP |
|---|---|
ListTemplates | GET /:bucket/tables/_templates |
gRPC setup —
grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.
What’s in the warehouse-compatible catalog
Every template here ships with K3 and is production-grade. Pick by use case + modality:
| Template | What it does | Modalities |
|---|---|---|
classification | Document type / topic / language / sensitivity classification | text, pdf |
document_triage | Rapid intake triage — classify + extract entities | text, pdf, docx, html, email |
entity_pii_extraction | Structured entities + PII detection | text, pdf |
image_understanding | Image analysis (ML object detection + OCR + LLM vision reasoning) | image |
ocr_extraction | Text extraction 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 target language | text |
audio_transcription | Whisper transcripts (+ optional diarization) | audio, video |
code_intelligence | Source-code symbols / dependencies / architecture | text |
object_detection | YOLOv8m object detection in images / video keyframes | image, video |
video_surveillance | Object tracking + activity classification | video |
product_catalog_enrichment | Product attribute enrichment from images + descriptions | image, text |
review_analysis | Customer review sentiment + toxicity + keyword extraction | text, pdf |
Full descriptions, labels, and the typed ScriptContract for each template are at Pipelines → Templates → The catalog.
ListTemplates
Request
HTTP
All warehouse-compatible templates:
curl -sS "https://k3.dev.dodil.io/kb-prod/tables/_templates" \
-H "Authorization: Bearer $DODIL_TOKEN"Filter by category:
curl -sS "https://k3.dev.dodil.io/kb-prod/tables/_templates?category=analysis" \
-H "Authorization: Bearer $DODIL_TOKEN"Free-text search:
curl -sS "https://k3.dev.dodil.io/kb-prod/tables/_templates?search=ocr" \
-H "Authorization: Bearer $DODIL_TOKEN"Response
HTTP
{
"templates": [
{
"id": "entity_pii_extraction",
"name": "Entity & PII Extraction",
"description": "Extract structured entities and detect PII from any document.",
"tags": ["analysis", "pii"],
"labels": {
"category": "analysis",
"modality": "text, pdf",
"warehouse_compatible": "true",
"status": "ready"
},
"category": "analysis",
"modalities": ["text", "pdf"],
"acceptedExtensions": ["pdf", "txt", "docx"],
"acceptedContentTypes": ["application/pdf", "text/plain"]
}
]
}Using a template — the canonical flow
# 1. Browse — pick a template
curl -sS "https://k3.dev.dodil.io/kb-prod/tables/_templates" \
-H "Authorization: Bearer $DODIL_TOKEN" | jq '.templates[] | {id, name, modalities, acceptedExtensions}'
# 2. Create a pipeline-bound table from it
curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/tables/pipelines" \
-H "Authorization: Bearer $DODIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bucket": "kb-prod",
"name": "entities",
"templateId": "entity_pii_extraction",
"folderPrefix": "intake"
}'
# 3. Upload a document under intake/ — K3 auto-extracts rows into the table
dodil k3 object create ./contract.pdf -b kb-prod -k intake/contracts/acme-2026.pdf
# 4. Query the auto-extracted rows
dodil k3 table query --bucket kb-prod --sql "
SELECT entity_type, entity_value FROM entities
WHERE source_key = 'intake/contracts/acme-2026.pdf' AND is_pii = true
"For the full recipe (including how to inspect the auto-generated ingest rule + per-object jobs), see Recipes → Pipeline-bound table.
output_columnsis always empty here — warehouse templates use lazy schema materialization. K3 doesn’t know the column layout until the first ingest job runs. After first ingest,DescribeTablereturns the real schema.
See also
- Tables → CreateTablePipeline — how templates back tables
- Recipes → Pipeline-bound table — end-to-end worked example
- Pipelines → Templates → The catalog — full descriptions of all 24 templates (including non-warehouse ones)
- Concepts → ScriptContract — the template’s underlying typed contract (this
Templateprojectsoutput_columns+accepted_*from it rather than the raw contract) grpcurlreference — full flag set + reflection-disabled fallbacks