Skip to Content
We are live but in Staging 🎉

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.

RPCHTTP
ListTemplatesGET /: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:

TemplateWhat it doesModalities
classificationDocument type / topic / language / sensitivity classificationtext, pdf
document_triageRapid intake triage — classify + extract entitiestext, pdf, docx, html, email
entity_pii_extractionStructured entities + PII detectiontext, pdf
image_understandingImage analysis (ML object detection + OCR + LLM vision reasoning)image
ocr_extractionText extraction from scanned / image-based documentspdf, image
sentiment_intent_analysisSentiment, intent, topics, urgency, toxicitytext, pdf
summarizationMulti-level document summarization + keyword extractiontext, pdf, docx, html
translationTranslate text to target languagetext
audio_transcriptionWhisper transcripts (+ optional diarization)audio, video
code_intelligenceSource-code symbols / dependencies / architecturetext
object_detectionYOLOv8m object detection in images / video keyframesimage, video
video_surveillanceObject tracking + activity classificationvideo
product_catalog_enrichmentProduct attribute enrichment from images + descriptionsimage, text
review_analysisCustomer review sentiment + toxicity + keyword extractiontext, pdf

Full descriptions, labels, and the typed ScriptContract for each template are at Pipelines → Templates → The catalog.

ListTemplates

Request

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

{ "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_columns is 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, DescribeTable returns the real schema.


See also