> ## 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.

# Open a stored import bundle

> Returns a bundle stored by POST /v1/import-bundles, for the Create a Build wizard to pre-fill from. Readable only by the workspace AND the user that created it, and only until it expires 24 hours after creation. Every other case (no such bundle, malformed id, expired, another workspace, another user in the same workspace) is the same 404 `IMPORT_BUNDLE_NOT_FOUND` with an identical body, so a 404 does not say whether the bundle exists: the wizard should tell the user the bundle is unavailable or belongs to another workspace or user, not that it was never created. `IMPORT_BUNDLE_IN_PROGRESS` (429, with Retry-After) means the caller already has another import-bundle request in progress, and `IMPORT_BUNDLE_BUSY` (503, with Retry-After) that the instance's memory budget for bundles stayed full for 5 seconds; retry either after the given seconds. The body is written within 60 seconds; a caller that reads it slower than that is cut off with an incomplete body and should retry.




## OpenAPI

````yaml /openapi-builder.yaml get /v1/import-bundles/{id}
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/import-bundles/{id}:
    get:
      summary: Open a stored import bundle
      description: >
        Returns a bundle stored by POST /v1/import-bundles, for the Create a
        Build wizard to pre-fill from. Readable only by the workspace AND the
        user that created it, and only until it expires 24 hours after creation.
        Every other case (no such bundle, malformed id, expired, another
        workspace, another user in the same workspace) is the same 404
        `IMPORT_BUNDLE_NOT_FOUND` with an identical body, so a 404 does not say
        whether the bundle exists: the wizard should tell the user the bundle is
        unavailable or belongs to another workspace or user, not that it was
        never created. `IMPORT_BUNDLE_IN_PROGRESS` (429, with Retry-After) means
        the caller already has another import-bundle request in progress, and
        `IMPORT_BUNDLE_BUSY` (503, with Retry-After) that the instance's memory
        budget for bundles stayed full for 5 seconds; retry either after the
        given seconds. The body is written within 60 seconds; a caller that
        reads it slower than that is cut off with an incomplete body and should
        retry.
      operationId: getImportBundle
      parameters:
        - $ref: '#/components/parameters/PathID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportBundle'
        '401':
          description: No valid credential, or the credential names no workspace or user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          description: >
            The caller already has another import-bundle request in progress
            (IMPORT_BUNDLE_IN_PROGRESS); retry after the Retry-After seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >
            The builder instance's memory budget for import bundles stayed full
            for 5 seconds (IMPORT_BUNDLE_BUSY); retry after the Retry-After
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    PathID:
      name: id
      in: path
      required: true
      schema:
        type: string
  schemas:
    ImportBundle:
      type: object
      description: >
        A stored import bundle as its creator reads it back. Answers "what did
        the user's local ComfyUI have installed and open when they asked to
        deploy it". It is a record of the local machine, not a build definition:
        nothing in it has been resolved or checked against the registry.
      required:
        - id
        - workspaceId
        - createdAt
        - expiresAt
        - snapshot
        - models
      properties:
        id:
          type: string
          format: uuid
        workspaceId:
          type: string
          description: The workspace the bundle belongs to; always the caller's.
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
          description: >
            When the bundle stops being readable. Not a countdown the wizard
            needs to enforce: the builder already refuses expired bundles.
        name:
          type: string
          description: The label sent at create. Absent when none was sent.
        snapshot:
          allOf:
            - $ref: '#/components/schemas/ImportBundleSnapshot'
          x-go-type: json.RawMessage
        models:
          type: array
          x-go-type: json.RawMessage
          description: >
            Every model file installed locally, as sent. Not the models the
            workflow needs, and not a statement that any of them can be
            downloaded for a build.
          items:
            $ref: '#/components/schemas/ImportBundleModel'
        workflow:
          allOf:
            - $ref: '#/components/schemas/ComfyWorkflow'
          description: The workflow sent at create, as sent. Absent when none was sent.
          x-go-type: json.RawMessage
          x-go-type-skip-optional-pointer: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable detail.
    ImportBundleSnapshot:
      type: object
      description: >
        A ComfyUI Desktop snapshot export (the same format DesktopSnapshot
        reads), constrained for storage: `type` must be
        "comfyui-desktop-2-snapshot" and `snapshots` must be non-empty. Stored
        and returned as sent; feed it to POST /v1/snapshots/resolve to learn
        what it maps to.
      required:
        - type
        - snapshots
      properties:
        type:
          type: string
          enum:
            - comfyui-desktop-2-snapshot
        snapshots:
          type: array
          minItems: 1
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    ImportBundleModel:
      type: object
      description: >
        One model file installed in the local ComfyUI. Answers "which models
        does the user already have, and where": a folder name plus a path
        relative to it, never an absolute path and never a hash, so it is not
        proof of the file's contents.
      required:
        - directory
        - filename
      properties:
        directory:
          type: string
          minLength: 1
          maxLength: 256
          description: >-
            The ComfyUI model folder name it was found under, e.g. "checkpoints"
            or "loras".
        filename:
          type: string
          minLength: 1
          maxLength: 1024
          description: >
            Path relative to that folder, with any subfolders, as ComfyUI lists
            it (e.g. "sdxl/model.safetensors").
    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
  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.