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

+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.",