/v1/creative-agent/workflows/templates
Auth required
Create a workflow template. Returns 422 with structured issues when the template fails schema validation.
#Body
| Name | Type | In | Description |
|---|---|---|---|
| name* | string | body | Human-readable template name. |
| description | string | body | Plain-text description shown in builders and listings. |
| brief | string | body | Optional planner brief that produced this template. |
| category | string | body | Template category. Defaults to custom. |
| stability | string | body | experimental (default), beta, or stable. |
| author | string | body | Defaults to system. |
| visibility | string | body | private (default), public. |
| inputs* | array | body | Typed input slots. Each entry declares name, type, optional default + validation. |
| stages* | array | body | Parameterized stages that compile into steps[] at run time. Bind to inputs via $inputs.<name>. |
| exposeToLLM | boolean | body | When true, the template appears as a callable tool in chat (workflow:<id>). |
| tags | string[] | body | Free-form tags. |
| graph | object | body | Optional visual-builder graph metadata. Round-trips with the form-based view. |
| previewArtifacts | object | body | Optional preview artifacts (sample image URLs etc.) used in template listings. |
| estimatedCapacityUnits | number|object | body | Optional capacity-unit estimate. Used by callers to show price before run. |
| llmPriority | number | body | Optional ranking signal when the LLM exposes saved workflows as tools. |
| metadata | object | body | Arbitrary caller metadata. |
| id | string | body | Optional caller-chosen ID. Otherwise minted server-side. |
#Response
{
"status": "success",
"data": { "template": { "id": "wf_…", "version": "0.0.1", /* … */ } }
}