run_template
Run a gallery template by name with specified parameters, then wait and stream progress to return the full result. Submit asynchronously for long video runs.
Instructions
Run a gallery template — fetch, fill params, execute.
Wraps comfy run-template <name> [--param=KEY=VALUE]… (fetches the
graph, fills its slots, runs via the same path as run_workflow) — the
one-command alternative to search_templates -> fetch_template ->
run_workflow.
Args:
params: {slot: value}, slot an address ("6.text") or unique
name ("prompt"); list slots by fetching the template first.
Subgraph interior slots use A/B.name addressing.
confirm_spend: SOME templates embed partner-API (paid) nodes and spend
the signed-in account's Comfy credits when run. Set True ONLY when
the user has actually agreed — never merely to clear an error.
Free templates are never gated by this.
wait: if True (default), block and stream progress, returning the full
result. If False, submit --async and return a prompt_id to
poll — preferred for long (video) runs.
timeout_seconds: bounds this call's wall clock (default 600s).
Gotchas:
- Without consent, a paid template fails CLOSED
(spend_consent_required, nothing spent); free templates run.
- A missing referenced model surfaces as a per-node error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| wait | No | ||
| params | No | ||
| confirm_spend | No | ||
| timeout_seconds | No |