メインコンテンツへスキップ
POST
Read a ComfyUI workflow as a build definition

承認

Authorization
string
header
必須

A workspace-scoped Cloud JWT. A missing or invalid token is 401 UNAUTHORIZED in the Error body.

ボディ

application/json
workflow
object
必須

A ComfyUI workflow, in either export dialect. The API format is a flat object of node id to node, each carrying class_type and its values under inputs. The UI format carries a nodes array with positional widgets_values alongside a links array, which is what identifies it, and may hold reusable groups under definitions.subgraphs that are expanded when read.

Read rather than validated field by field: the node classes and model filenames are taken out, and everything else is ignored. A payload that matches neither dialect is a 400.

レスポンス

The workflow was read. A report naming models is the normal outcome, not a failure: resolving them to sources is the caller's next step.

definition
object
必須

The user's environment choices (nodes, models, base version). Free-form for MVP, except that a field named like a known one in another case (customnodes for customNodes) is rejected: create and update refuse one they bring in, and check and cut refuse it wherever it sits. A public custom node declares an https github.com repository URL plus an optional gitRef (absent means the default branch); a private one references an uploaded blobId; exactly one of the two per node. A model declares a type (the ComfyUI model folder it lands in, e.g. checkpoints, loras, vae) plus exactly one source, a public sourceUri (https) or a private blobId, and an optional filename and sha256; the built release records each model so it can be placed at deploy time (models are not baked into the image). A CivitAI sourceUri is saved without its token query parameter and any user:password@ part, since a deployment downloads CivitAI links with the platform's own token, so a saved definition can read back without them. A CivitAI sourceUri (civitai.com or civitai.red, with or without www.) should be a download link (https://civitai.com/api/download/models/) or a model page link (https://civitai.com/models/), since a deployment can download no other CivitAI link: create and update warn on any other, and check and cut refuse it. An optional baseImage names the curated base image (the CUDA/Python/torch runtime the build is built on) by id; omitted means the default, and an unrecognized id is rejected (only images we build are selectable, never an arbitrary ref). pipDependencies is a requirements.txt string (one requirement per line). A version pin (numpy<2.5) is applied as an override in the single dependency resolution, so it beats every other declaration of that package; it forces a version rather than adding a package, so use it to correct versions your nodes already bring in, and the build warns about a pin nothing else requires. A direct reference to an https wheel (nunchaku @ https://host/nunchaku-1.0.1-cp311-cp311-linux_x86_64.whl) is instead a root of the resolution and adds that package, which is how an engine published only as a wheel outside PyPI gets in; an optional #sha256= fragment on the address is verified at install. Local paths, file: URLs, git+ references and addresses carrying credentials are dropped with a warning, and so is an address for a package a version pin in the same blob also names, whatever markers either line carries, because the pin would replace the address in the resolution. modelPolicy, partnerNodePolicy and customNodePolicy are allow/deny lists for which models, partner nodes and custom nodes the build permits: each is an object with a mode of "allowlist" (allow only the list) or "blocklist" (allow all except the list) plus a list of string ids. An optional uiOrigin string records which client flow authored the definition; the platform currently writes "desktop-snapshot" or "comfyui-bundle". It is attribution only: stored and read back as sent, never validated, and it changes nothing about the build (the worker reports it, truncated to 64 characters, as ui_origin on its build analytics events).

report
object
必須

Everything a workflow could not carry into its definition.

format
enum<string>
必須

Which export dialect the file was read as.

利用可能なオプション:
api,
ui