← Docs API Reference
Get an API key →
API ReferenceWorkflow Templates

Workflow Templates

Surface · Reusable recipes

#Workflow Templates

Saveable, parameterized versions of a workflow plan. A template declares typed inputs[] and a list of parameterized stages[]. Invoking by workflow_id + inputs compiles a fresh steps[] and starts a creative-workflow run that authorizes cost on start — it returns 202 with waitingForCostApproval: true and a preview, then dispatches once released via POST /:id/confirm-cost.

POST /v1/creative-agent/workflows/templates Auth required

Create a workflow template. Returns 422 with structured issues when the template fails schema validation.

#Body

NameTypeInDescription
name*stringbodyHuman-readable template name.
descriptionstringbodyPlain-text description shown in builders and listings.
briefstringbodyOptional planner brief that produced this template.
categorystringbodyTemplate category. Defaults to custom.
stabilitystringbodyexperimental (default), beta, or stable.
authorstringbodyDefaults to system.
visibilitystringbodyprivate (default), public.
inputs*arraybodyTyped input slots. Each entry declares name, type, optional default + validation.
stages*arraybodyParameterized stages that compile into steps[] at run time. Bind to inputs via $inputs.<name>.
exposeToLLMbooleanbodyWhen true, the template appears as a callable tool in chat (workflow:<id>).
tagsstring[]bodyFree-form tags.
graphobjectbodyOptional visual-builder graph metadata. Round-trips with the form-based view.
previewArtifactsobjectbodyOptional preview artifacts (sample image URLs etc.) used in template listings.
estimatedCapacityUnitsnumber|objectbodyOptional capacity-unit estimate. Used by callers to show price before run.
llmPrioritynumberbodyOptional ranking signal when the LLM exposes saved workflows as tools.
metadataobjectbodyArbitrary caller metadata.
idstringbodyOptional caller-chosen ID. Otherwise minted server-side.

#Response

{
  "status": "success",
  "data": { "template": { "id": "wf_…", "version": "0.0.1", /* … */ } }
}
GET /v1/creative-agent/workflows/templates Auth required

List workflow templates. Filter by visibility.

#Query parameters

NameTypeInDescription
visibilitystringqueryown, public, or all (default).
offsetintegerqueryDefault 0.
limitintegerqueryDefault 20, max 100.
GET /v1/creative-agent/workflows/templates/:id Auth required

Fetch a single template.

PATCH /v1/creative-agent/workflows/templates/:id Auth required

Update a template. Same field set as create; the new shape is re-validated before persistence.

DELETE /v1/creative-agent/workflows/templates/:id Auth required

Delete a template. Existing in-flight runs continue against their pinned template version.

POST /v1/creative-agent/workflows/templates/:id/fork Auth required

Fork a public or shared template into the caller's namespace. Returns the new template.