Create Template
Templates
Create Template
Create a new reusable workflow template
Create Template
Overview
Create a new template to store and reuse ComfyUI workflow definitions. Templates allow you to save workflow structures that can be reused across multiple workflow executions.Content Type
This endpoint requiresmultipart/form-data content type.
Request Parameters
string
required
A descriptive name for your template (1-100 characters).
string
required
A description of what this template does (1-500 characters).
file
required
A JSON file containing the ComfyUI workflow definition.
Response
string
required
Unique identifier (UUID) for the template.
string
required
UUID of the user who owns this template.
string
required
The template’s name.
string
required
The template’s description.
object
required
The ComfyUI workflow definition as a JSON object.
string
required
ISO 8601 timestamp when the template was created.
string
required
ISO 8601 timestamp when the template was last updated.
Example Response
cURL Example
Since the API playground doesn’t support file uploads, use this cURL command to test:YOUR_API_TOKENwith your actual API token/path/to/workflow.jsonwith the path to your ComfyUI workflow JSON file
-F flag automatically handles multipart/form-data with proper boundaries.
Error Responses
error
Bad request - validation error in the request.Common causes:
- Missing required fields
- Name or description too long
- Invalid JSON in body file
error
Unauthorized - invalid or missing authentication token.
error
Forbidden - template limit exceeded for your tier.
Notes
- Templates are personal and not shared with other users
- Use templates to standardize workflows across your organization
- Templates can be used as a starting point for creating workflows
- The body field stores the complete ComfyUI workflow JSON structure
- Templates count toward your tier’s template limit
- Use cURL, Postman, or application code for testing - the API playground doesn’t support file uploads