Save Template
save_templateCreate a canonical company template, or replace one by passing template_id with expected_revision. Send typed GenerationCommand objects; updates are complete replacements. This persists the template and does not generate images. If a generation_preset create fails structurally, or legacy keys appear (camera_quantities, step2_operations, operations, fixed_context, variable_context, input_policy, cameraQuantities, step2Operations, fixedContext, variableContext, inputPolicy, or their camelCase forms), these describe a batch workflow — use template_kind=batch_workflow. front + back is one batch workflow: Step 1 front generation, Step 2 back camera edit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Template name | |
| payload | Yes | Versioned template payload containing canonical generation commands | |
| description | No | Optional sentence explaining when to use the template | |
| template_id | No | Template ID when replacing an existing template | |
| catalog_scope | No | Template catalog scope: library or owner_only | library |
| template_kind | Yes | Template kind: generation_preset or batch_workflow | |
| expected_revision | No | Current revision when replacing an existing template; omit for create |