> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Dry-run resolve a definition

> Resolves the current definition and reports any problems without cutting a release, so the editor catches mistakes before a real build. The lookups outside the definition run side by side and answer within about two seconds; a lookup the budget stops early reports only what it reached, and a release cut re-runs its own. A refusal carries its warnings and the definition as saved too.

The body is optional. Without one, or without a `workflow` in it, the answer is exactly the check above. With a workflow, the answer also carries `workflowCoverage`: which of the workflow's custom node classes the saved definition installs, lacks, or leaves undecided, read the way POST /v1/workflows/validate reads it. A workflow that is not one is a 400 with `error` INVALID_WORKFLOW (or WORKFLOW_TOO_LARGE) and the reason at field `workflow`, before any other check runs.




## OpenAPI

````yaml /openapi-builder.yaml post /v1/builds/{id}/validate
openapi: 3.0.3
info:
  title: Comfy Builder API
  version: 0.1.0
  description: >
    Builder owns builds (editable environment definitions) and cuts immutable,
    deployable releases that Deploy later runs.
servers:
  - url: https://platformapi.comfy.org/builder
    description: Comfy Developer Platform
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /v1/builds/{id}/validate:
    post:
      summary: Dry-run resolve a definition
      description: >
        Resolves the current definition and reports any problems without cutting
        a release, so the editor catches mistakes before a real build. The
        lookups outside the definition run side by side and answer within about
        two seconds; a lookup the budget stops early reports only what it
        reached, and a release cut re-runs its own. A refusal carries its
        warnings and the definition as saved too.


        The body is optional. Without one, or without a `workflow` in it, the
        answer is exactly the check above. With a workflow, the answer also
        carries `workflowCoverage`: which of the workflow's custom node classes
        the saved definition installs, lacks, or leaves undecided, read the way
        POST /v1/workflows/validate reads it. A workflow that is not one is a
        400 with `error` INVALID_WORKFLOW (or WORKFLOW_TOO_LARGE) and the reason
        at field `workflow`, before any other check runs.
      operationId: validateBuild
      parameters:
        - $ref: '#/components/parameters/PathID'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateBuildRequest'
      responses:
        '200':
          description: Resolvable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateResult'
        '400':
          description: The definition has problems, or the workflow sent is not one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PathID:
      name: id
      in: path
      required: true
      schema:
        type: string
  schemas:
    ValidateBuildRequest:
      type: object
      description: The optional body of POST /v1/builds/{id}/validate.
      properties:
        workflow:
          $ref: '#/components/schemas/ComfyWorkflow'
    ValidateResult:
      type: object
      required:
        - ok
      properties:
        ok:
          type: boolean
        resolved:
          type: object
          additionalProperties: true
          description: The resolved definition when ok is true.
        warnings:
          type: array
          description: >-
            Non-blocking, best-effort advisories: a git ref or repository that
            could not be resolved against its remote, a model link a deployment
            could not download at `models[<n>].sourceUri`, a declared sha256 its
            link's host contradicts at `models[<n>].sha256`, or a custom node
            that installs a pack known not to work fully on a deployment at
            `customNodes[<n>]`. Never affects ok, and none blocks a submit. A
            cut checks the models again and can still refuse a new release with
            400 INVALID_DEFINITION, for example where a declared sha256 differs
            from the one its link's host states.
          items:
            $ref: '#/components/schemas/ValidationIssue'
        workflowCoverage:
          $ref: '#/components/schemas/WorkflowCoverage'
    ValidationError:
      type: object
      required:
        - error
        - invalid
      properties:
        error:
          type: string
          description: >-
            INVALID_DEFINITION, or, from POST /v1/builds/{id}/validate only,
            INVALID_WORKFLOW or WORKFLOW_TOO_LARGE for the workflow it was sent.
        invalid:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
        workflowCoverage:
          $ref: '#/components/schemas/WorkflowCoverage'
        warnings:
          type: array
          description: >-
            POST /v1/builds/{id}/validate only: the non-blocking advisories it
            found beside the problems, such as a model link a deployment could
            not download at `models[<n>].sourceUri`. A release cut never sets
            it.
          items:
            $ref: '#/components/schemas/ValidationIssue'
        resolved:
          type: object
          additionalProperties: true
          description: >-
            POST /v1/builds/{id}/validate only: the definition as saved, so a
            caller can name the model a `models[<n>]` finding is about. A
            release cut never sets it.
    ComfyWorkflow:
      type: object
      description: >
        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.
      additionalProperties: true
    ValidationIssue:
      type: object
      required:
        - field
        - reason
      properties:
        field:
          type: string
        reason:
          type: string
    WorkflowCoverage:
      type: object
      description: >
        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.
      required:
        - format
        - complete
        - covered
        - missing
        - unverified
      properties:
        format:
          type: string
          description: >-
            Which export dialect the file was read as, `api` or `ui` (the same
            values as WorkflowResolveResult's `format`).
        complete:
          type: boolean
          description: >
            True only when the definition provably installs every custom class:
            nothing missing and nothing unverified. Not a statement about
            models, Python packages or partner access.
        covered:
          type: integer
          description: How many distinct custom classes the definition provides.
        missing:
          type: array
          description: The packs to add, sorted by `packId`.
          items:
            $ref: '#/components/schemas/WorkflowMissingPack'
        unverified:
          type: array
          description: The classes nothing could decide, sorted by `classType`.
          items:
            $ref: '#/components/schemas/WorkflowUnverifiedClass'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable detail.
    WorkflowMissingPack:
      type: object
      description: >-
        A pack the registry names for the workflow's classes and the definition
        lacks.
      required:
        - packId
        - classes
      properties:
        packId:
          type: string
          description: >-
            The registry id, or the clone URL for a pack the registry does not
            publish.
        name:
          type: string
        repository:
          type: string
        latestVersion:
          type: string
          description: >-
            The registry's newest published version, the one known to carry
            these classes.
        classes:
          type: array
          description: The workflow's classes this pack provides, sorted.
          items:
            type: string
    WorkflowUnverifiedClass:
      type: object
      required:
        - classType
        - reason
      properties:
        classType:
          type: string
        reason:
          type: string
          enum:
            - unknownClass
            - lookupFailed
            - pinnedVersion
            - otherRepository
            - stampOnly
            - uploadedPack
            - unmatchedUpload
          description: >
            unknownClass: nothing attributes the class to a pack. lookupFailed:
            the registry did not answer for its pack. pinnedVersion: the pack is
            in the definition at a registry version other than the latest, or at
            a git ref or commit. otherRepository: an entry carries the pack's
            registry id but installs from a different repository, such as a
            fork. stampOnly: the pack is in the definition, but only the pack
            the workflow file stamped on the class, or for a class with no
            registry stamp the registry's class index, attributes the class to
            it, so the pack may no longer ship it. uploadedPack: the pack is in
            the definition as an uploaded file. unmatchedUpload: the pack is
            absent by id and repository, but the definition holds an upload that
            may be it.
        packId:
          type: string
          description: The pack the class is attributed to, when one is known.
  responses:
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        A workspace-scoped Cloud JWT. A missing or invalid token is 401
        UNAUTHORIZED in the Error body.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        A workspace API key, sent alone. The service checks it on every request
        and acts as the key's user in the key's workspace. A request carrying a
        key and a Bearer token is 400 INVALID_REQUEST, and a value that is not a
        key's shape is 401 UNAUTHORIZED. A refused key answers 401
        (UNAUTHORIZED), 403 (FORBIDDEN), 404 (NOT_FOUND) or 429 (RATE_LIMITED)
        with its message and Retry-After; a 503 (SERVICE_UNAVAILABLE) means the
        key could not be checked right now, so retry. Each refusal answers the
        Error body.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.