curl --request POST \
--url https://platformapi.comfy.org/builder/v1/workflows/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow": {},
"definition": {}
}
'import requests
url = "https://platformapi.comfy.org/builder/v1/workflows/validate"
payload = {
"workflow": {},
"definition": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflow: {}, definition: {}})
};
fetch('https://platformapi.comfy.org/builder/v1/workflows/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platformapi.comfy.org/builder/v1/workflows/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflow' => [
],
'definition' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platformapi.comfy.org/builder/v1/workflows/validate"
payload := strings.NewReader("{\n \"workflow\": {},\n \"definition\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platformapi.comfy.org/builder/v1/workflows/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow\": {},\n \"definition\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/builder/v1/workflows/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow\": {},\n \"definition\": {}\n}"
response = http.request(request)
puts response.read_body{
"format": "<string>",
"complete": true,
"covered": 123,
"missing": [
{
"packId": "<string>",
"classes": [
"<string>"
],
"name": "<string>",
"repository": "<string>",
"latestVersion": "<string>"
}
],
"unverified": [
{
"classType": "<string>",
"reason": "unknownClass",
"packId": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Check that a definition installs every node a workflow uses
Compares a workflow with a definition the caller supplies, before any build exists or before one is saved, and writes nothing. Each distinct node class is attributed to a pack exactly as POST /v1/workflows/resolve attributes it, then that pack is looked for in the definition’s customNodes by the source each entry installs from: a registry version by its registry id, a repository by that repository. Built-in, partner and canvas classes install nothing and are left out.
A class is missing only when the registry names its pack and the definition plainly lacks it. A class that cannot be decided either way is unverified with a reason, never counted as covered: nothing attributes it to a pack, the registry did not answer, the pack is pinned to a version other than the registry’s latest (or to a git ref or commit) so nothing shows that version has the class, the entry with the pack’s id installs from another repository, only the workflow file’s own stamp attributes the class to the pack, or the pack may be an uploaded file. complete is true only when nothing is missing or unverified, so an unreachable registry never reads as an all-clear.
A 400 carries the identifier a caller branches on: INVALID_REQUEST when the workflow or the definition is absent, INVALID_WORKFLOW when the payload is not a workflow or holds no nodes, WORKFLOW_TOO_LARGE when it names more node classes than one import may carry, and INVALID_DEFINITION when customNodes cannot be read as nodes.
curl --request POST \
--url https://platformapi.comfy.org/builder/v1/workflows/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow": {},
"definition": {}
}
'import requests
url = "https://platformapi.comfy.org/builder/v1/workflows/validate"
payload = {
"workflow": {},
"definition": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflow: {}, definition: {}})
};
fetch('https://platformapi.comfy.org/builder/v1/workflows/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platformapi.comfy.org/builder/v1/workflows/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflow' => [
],
'definition' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platformapi.comfy.org/builder/v1/workflows/validate"
payload := strings.NewReader("{\n \"workflow\": {},\n \"definition\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platformapi.comfy.org/builder/v1/workflows/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow\": {},\n \"definition\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/builder/v1/workflows/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow\": {},\n \"definition\": {}\n}"
response = http.request(request)
puts response.read_body{
"format": "<string>",
"complete": true,
"covered": 123,
"missing": [
{
"packId": "<string>",
"classes": [
"<string>"
],
"name": "<string>",
"repository": "<string>",
"latestVersion": "<string>"
}
],
"unverified": [
{
"classType": "<string>",
"reason": "unknownClass",
"packId": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Autorizaciones
Cuerpo
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 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).
Respuesta
The comparison. Missing or unverified classes are the normal outcome of a definition that is not finished, not a failure.
Which of a workflow's custom node classes a definition installs. Every such class is counted in covered, listed under one pack in missing, or listed in unverified, exactly once.
¿Esta página le ayudó?