Define steps that call case.dev services:
Execute a pre-built document workflow:
{
"id" : "summarize_depo" ,
"service" : "workflows" ,
"workflow_id" : "workflow_uuid" ,
"input" : {
"text" : "{{input.transcript}}"
},
"options" : {
"model" : "anthropic/claude-sonnet-4.5" ,
"max_tokens" : 2000 ,
"format" : "json"
}
}
id : summarize_depo
service : workflows
workflow_id : workflow_uuid
input :
text : '{{input.transcript}}'
options :
model : anthropic/claude-sonnet-4.5
max_tokens : 2000
format : json
Call the LLM API directly:
{
"id" : "analyze" ,
"service" : "llm" ,
"input" : {
"text" : "{{input.case_facts}}"
},
"options" : {
"model" : "anthropic/claude-sonnet-4.5" ,
"max_tokens" : 1000 ,
"temperature" : 0.3
}
}
id : analyze
service : llm
input :
text : '{{input.case_facts}}'
options :
model : anthropic/claude-sonnet-4.5
max_tokens : 1000
temperature : 0.3
Or use messages format:
{
"id" : "chat" ,
"service" : "llm" ,
"input" : {
"messages" : [
{ "role" : "system" , "content" : "You are a legal assistant" },
{ "role" : "user" , "content" : "{{input.question}}" }
]
},
"options" : {
"max_tokens" : 500
}
}
id : chat
service : llm
input :
messages :
- role : system
content : You are a legal assistant
- role : user
content : '{{input.question}}'
options :
max_tokens : 500
Extract text from documents:
{
"id" : "ocr_doc" ,
"service" : "ocr" ,
"input" : {
"document_url" : "{{input.document_url}}"
},
"options" : {
"language" : "en"
}
}
id : ocr_doc
service : ocr
input :
document_url : '{{input.document_url}}'
options :
language : en
Store documents in a vault:
{
"id" : "store" ,
"service" : "vault" ,
"action" : "upload" ,
"vault_id" : "vault_123" ,
"input" : {
"filename" : "{{input.case_id}}/evidence/{{timestamp}}-summary.json" ,
"content" : "{{steps.previous_step.output}}" ,
"metadata" : {
"case_id" : "{{input.case_id}}" ,
"processed_at" : "{{timestamp}}"
}
}
}
id : store
service : vault
action : upload
vault_id : vault_123
input :
filename : '{{input.case_id}}/evidence/{{timestamp}}-summary.json'
content : '{{steps.previous_step.output}}'
metadata :
case_id : '{{input.case_id}}'
processed_at : '{{timestamp}}'
Path tips: The filename can include nested folders. For example, {{input.case_id}}/evidence/{{timestamp}}-summary.json will create a deterministic directory structure per case. If you only pass a file name, it will be written at the root of the vault.
Need to bring the stored object back later? Capture the vault response in a follow-up step:
{
"id" : "store" ,
"service" : "vault" ,
"action" : "upload" ,
"vault_id" : "vault_123" ,
"input" : {
"filename" : "{{input.case_id}}/reports/{{timestamp}}-summary.json" ,
"content" : "{{steps.summarize.output.content}}"
}
}
id : store
service : vault
action : upload
vault_id : vault_123
input :
filename : '{{input.case_id}}/reports/{{timestamp}}-summary.json'
content : '{{steps.summarize.output.content}}'
You can reference the upload metadata later with {{steps.store.output.objectId}} to generate signed download URLs or to trigger additional processing.
Transcribe audio:
{
"id" : "transcribe" ,
"service" : "voice" ,
"input" : {
"audio_url" : "{{input.audio_url}}"
},
"options" : {
"language" : "en-US"
}
}
id : transcribe
service : voice
input :
audio_url : '{{input.audio_url}}'
options :
language : en-US
{
"service" : "workflows" ,
"workflow_id" : "uuid" ,
"input" : {
"text" : "document text"
},
"options" : {
"model" : "anthropic/claude-sonnet-4.5" ,
"max_tokens" : 2000 ,
"format" : "json"
}
}
service : workflows
workflow_id : uuid
input :
text : document text
options :
model : anthropic/claude-sonnet-4.5
max_tokens : 2000
format : json
{
"service" : "llm" ,
"input" : {
"text" : "question" ,
"messages" : [{ "role" : "user" , "content" : "question" }]
},
"options" : {
"model" : "anthropic/claude-sonnet-4.5" ,
"max_tokens" : 1000 ,
"temperature" : 0.7
}
}
service : llm
input :
text : question
messages :
- role : user
content : question
options :
model : anthropic/claude-sonnet-4.5
max_tokens : 1000
temperature : 0.7
{
"service" : "ocr" ,
"input" : {
"document_url" : "https://..."
},
"options" : {
"language" : "en"
}
}
service : ocr
input :
document_url : https://...
options :
language : en
{
"service" : "vault" ,
"action" : "upload" ,
"vault_id" : "vault_123" ,
"input" : {
"filename" : "document.txt" ,
"content" : "..." ,
"metadata" : {}
}
}
service : vault
action : upload
vault_id : vault_123
input :
filename : document.txt
content : '...'
metadata : {}
{
"service" : "voice" ,
"input" : {
"audio_url" : "https://..."
},
"options" : {
"language" : "en-US"
}
}
service : voice
input :
audio_url : https://...
options :
language : en-US