Any ComfyUI workflow runs as a job, from the inputs its catalog entry declares
CI / test (push) Successful in 9m7s

A model's catalog entry now says what its workflow takes and makes:
comfyui.inputs, each a placeholder of its name with a type (text, int,
float, bool, choice, image, mask, audio, video, file), bounds, choices
and a default; and comfyui.output, which gains video, audio and files
beside pictures and meshes. POST /v1/workflows/runs with {model, inputs}
checks a request against them before a job is written — a required input
left out, an unknown one, a number out of bounds, a song sent as a
picture, another owner's file id are each refused with what was wrong —
and the job worker replays it to a replica, where the files go into
ComfyUI's input directory, the workflow is filled and run, and the first
file of the model's output kind is the job's result. /v1/models lists
each ComfyUI model's workflow, so a client can build its form.

A PNG result carries the licence in an iTXt chunk, as a GLB does in
asset.extras. A file whose server named no type is typed by its name
before its bytes, so a WAV is audio/wav, not audio/wave.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-11 14:28:15 +02:00
1 parent b43e66c95e
commit b6bfc33ef7
20 files changed
+1660 -44

No files matched your search

+49 -1
View File
@@ -8774,7 +8774,14 @@
},
"output": {
"type": "string",
"description": "Output is what the workflow makes: pictures (the default), asked for at /v1/images/generations, or meshes, asked for as a job at /v1/3d/generations from a picture."
"description": "Output is what the workflow makes: pictures (the default), asked for at /v1/images/generations; meshes, asked for as a job at /v1/3d/generations from a picture; or video, audio or files. Every kind is asked for as a job at /v1/workflows/runs too."
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/catalog.Input"
},
"description": "Inputs are what the workflow takes from a request at /v1/workflows/runs, each the placeholder of its name."
},
"nodes": {
"type": "array",
@@ -8879,6 +8886,47 @@
}
}
},
"catalog.Input": {
"type": "object",
"description": "Input is one thing a workflow takes from a request: the placeholder {{name}} in its graph, filled with the request's inputs.name.",
"properties": {
"name": {
"type": "string",
"description": "Name is the placeholder's, and the request's key."
},
"type": {
"type": "string",
"description": "Type is one of text, int, float, bool, choice, image, mask, audio, video, file. The last five are files, sent as base64, a data URL, or the id of a file uploaded to /v1/files, and put in ComfyUI's input directory; the placeholder gets the name they were given there."
},
"required": {
"type": "boolean",
"description": "Required inputs must be in every request; the others take Default, or the workflow's own {{name|default}}."
},
"default": {},
"min": {
"type": "number",
"description": "Min and Max bound a number; for text, Max bounds its length."
},
"max": {
"type": "number"
},
"choices": {
"type": "array",
"items": {
"type": "string"
},
"description": "Choices are what a choice may be."
},
"max_mb": {
"type": "integer",
"description": "MaxMB bounds a file input; zero is the type's own bound."
},
"doc": {
"type": "string",
"description": "Doc says what the input is for, to whoever fills it in."
}
}
},
"catalog.License": {
"type": "object",
"description": "License is the terms what a model makes comes under: said beside every result, and written into a mesh, which travels without the API.",
+257 -1
View File
@@ -73,6 +73,9 @@
},
{
"name": "threads"
},
{
"name": "workflows"
}
],
"paths": {
@@ -1477,6 +1480,163 @@
}
}
}
},
"/v1/workflows/runs": {
"post": {
"operationId": "postWorkflowsRuns",
"summary": "Run a ComfyUI model's workflow, as a job",
"description": "Inputs are those the model's workflow lists in /v1/models. Answered 202 with the job; download output_file_id from /v1/files once it is completed.",
"tags": [
"workflows"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunRequest"
}
}
}
},
"responses": {
"202": {
"description": "Accepted: started, and running on.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Job"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
},
"get": {
"operationId": "getWorkflowsRuns",
"summary": "The caller's jobs, newest first",
"tags": [
"workflows"
],
"parameters": [
{
"name": "limit",
"in": "query",
"description": "The most jobs to answer with, at most 100; 20 when absent.",
"schema": {
"type": "integer"
}
},
{
"name": "after",
"in": "query",
"description": "A job's ID: those asked for before it.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobList"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/workflows/runs/{id}": {
"get": {
"operationId": "getWorkflowsRunsId",
"summary": "A run: its status, progress and result",
"tags": [
"workflows"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The job's ID, job_….",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Job"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/workflows/runs/{id}/cancel": {
"post": {
"operationId": "postWorkflowsRunsIdCancel",
"summary": "Stop a run, in the engine's queue too",
"tags": [
"workflows"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The job's ID, job_….",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Job"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
}
},
"components": {
@@ -2192,6 +2352,10 @@
"type": "object",
"description": "License is the terms what a model makes comes under.",
"properties": {
"id": {
"type": "string",
"description": "ID is SPDX where there is one, else the licence's own short name."
},
"name": {
"type": "string"
},
@@ -2200,6 +2364,24 @@
},
"notice": {
"type": "string"
},
"commercial": {
"type": "boolean",
"description": "Commercial is whether the output may be used commercially; absent is not said."
},
"excluded_regions": {
"type": "array",
"items": {
"type": "string"
},
"description": "ExcludedRegions are ISO 3166 codes, EU for the union, where it grants nothing."
},
"revenue_cap_usd": {
"type": "integer",
"format": "int64"
},
"attribution": {
"type": "string"
}
}
},
@@ -2389,10 +2571,14 @@
"additionalProperties": {
"type": "boolean"
},
"description": "Capabilities: tools, vision, embeddings, images, meshes."
"description": "Capabilities: tools, vision, embeddings, images, meshes, workflows."
},
"license": {
"$ref": "#/components/schemas/License"
},
"workflow": {
"$ref": "#/components/schemas/WorkflowInfo",
"description": "Workflow is what a ComfyUI model takes and makes."
}
}
},
@@ -2525,6 +2711,25 @@
}
}
},
"RunRequest": {
"type": "object",
"description": "RunRequest asks a ComfyUI model to run its workflow.",
"properties": {
"model": {
"type": "string"
},
"inputs": {
"type": "object",
"additionalProperties": {},
"description": "Inputs are by name, as the model's workflow lists them in /v1/models."
},
"seed": {
"type": "integer",
"format": "int64",
"description": "Seed is the workflow's {{seed}}, where it has one; random otherwise."
}
}
},
"ScoreRequest": {
"type": "object",
"description": "ScoreRequest scores pairs of texts, for a scorer vLLM serves.",
@@ -2608,6 +2813,57 @@
}
}
},
"WorkflowInfo": {
"type": "object",
"description": "WorkflowInfo is what a ComfyUI model takes and makes, for a run at /v1/workflows/runs.",
"properties": {
"output": {
"type": "string",
"description": "Output is pictures, meshes, video, audio or files."
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkflowInput"
}
}
}
},
"WorkflowInput": {
"type": "object",
"description": "WorkflowInput is one input a workflow takes.",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "Type is text, int, float, bool, choice, image, mask, audio, video or file; the last five are sent as base64, a data URL, or a file's id."
},
"required": {
"type": "boolean"
},
"default": {},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"choices": {
"type": "array",
"items": {
"type": "string"
}
},
"max_mb": {
"type": "integer"
},
"doc": {
"type": "string"
}
}
},
"router.KBCollectionView": {
"type": "object",
"description": "KBCollectionView is a collection as a caller sees it.",
+76 -2
View File
@@ -65,6 +65,7 @@ rather than repeated.
| `workflow` | `string` | [ComfyUI](#comfyui) |
| `checkpoint` | `string` | [ComfyUI](#comfyui) |
| `output` | `string` | [ComfyUI](#comfyui) |
| `inputs` | `[]Input` | [ComfyUI](#comfyui) |
| `nodes` | `[]CustomNode` | [ComfyUI](#comfyui) |
| `environment` | `string` | [ComfyUI](#comfyui) |
| `dir` | `string` | [ComfyUIConfig](#comfyuiconfig) |
@@ -120,6 +121,15 @@ rather than repeated.
| `enabled` | `bool` | [FirewallSettings](#firewallsettings) |
| `format` | `string` | [GuardModel](#guardmodel) |
| `categories` | `[]string` | [GuardModel](#guardmodel) |
| `name` | `string` | [Input](#input) |
| `type` | `string` | [Input](#input) |
| `required` | `bool` | [Input](#input) |
| `default` | `any` | [Input](#input) |
| `min` | `*float64` | [Input](#input) |
| `max` | `*float64` | [Input](#input) |
| `choices` | `[]string` | [Input](#input) |
| `max_mb` | `int` | [Input](#input) |
| `doc` | `string` | [Input](#input) |
| `model` | `string` | [JudgePolicy](#judgepolicy) |
| `models` | `[]string` | [JudgePolicy](#judgepolicy) |
| `input` | `string` | [JudgePolicy](#judgepolicy) |
@@ -789,8 +799,16 @@ must.
`string`
Output is what the workflow makes: pictures (the default), asked for
at /v1/images/generations, or meshes, asked for as a job at
/v1/3d/generations from a picture.
at /v1/images/generations; meshes, asked for as a job at
/v1/3d/generations from a picture; or video, audio or files. Every
kind is asked for as a job at /v1/workflows/runs too.
### `inputs`
`[]Input`
Inputs are what the workflow takes from a request at
/v1/workflows/runs, each the placeholder of its name.
### `nodes`
@@ -1201,6 +1219,62 @@ ShieldGemma: Yes or No), or json ({"safe": false, "categories":
Categories the model is asked about, for shieldgemma — each a policy
sentence — and the names reported for llamaguard3's S1, S2, ….
## Input
### `name`
`string`
Name is the placeholder's, and the request's key.
### `type`
`string`
Type is one of text, int, float, bool, choice, image, mask, audio,
video, file. The last five are files, sent as base64, a data URL, or
the id of a file uploaded to /v1/files, and put in ComfyUI's input
directory; the placeholder gets the name they were given there.
### `required`
`bool`
Required inputs must be in every request; the others take Default,
or the workflow's own {{name|default}}.
### `default`
`any`
### `min`
`*float64`
Min and Max bound a number; for text, Max bounds its length.
### `max`
`*float64`
### `choices`
`[]string`
Choices are what a choice may be.
### `max_mb`
`int`
MaxMB bounds a file input; zero is the type's own bound.
### `doc`
`string`
Doc says what the input is for, to whoever fills it in.
## JudgePolicy
### `model`