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

# How long a deployment of a release would take to come up

> Answers, before anything is created, how many bytes of models a deployment of this release on this GPU and location would have to put on its disk, how many of them are already held, and a range of seconds until it reads ready. The same pair a create sends picks the provider, so the rates are those of the provider the create would run on.

A range, not a promise: the long end is meant to be rarely beaten. It covers model staging (stagingSecondsLow/High) and starting the endpoint (startupSecondsLow/High), and nothing after ready: a first request can still wait for a worker to start, and running a workflow is not counted. atLeast is true when some models had no size to add, or the release was never measured, so the bytes and the time are a floor.

bytesHeld is the release's whole total where this workspace already ran the release to ready on the same provider and that provider keeps what it staged, and 0 otherwise.

The estimate can be switched off per workspace. Switched off, this is still a 200, with enabled false and no other field: a client shows no estimate and says nothing about it, exactly as for a service too old to have this route.




## OpenAPI

````yaml /openapi-deploy.yaml get /v1/deploy-estimate
openapi: 3.0.3
info:
  title: Comfy Deploy API
  version: 0.1.0
  description: >
    Deploy takes an immutable release cut by Builder and runs it as a live
    autoscaling serverless endpoint.
servers:
  - url: https://platformapi.comfy.org/deploy
    description: Comfy Developer Platform
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /v1/deploy-estimate:
    get:
      summary: How long a deployment of a release would take to come up
      description: >
        Answers, before anything is created, how many bytes of models a
        deployment of this release on this GPU and location would have to put on
        its disk, how many of them are already held, and a range of seconds
        until it reads ready. The same pair a create sends picks the provider,
        so the rates are those of the provider the create would run on.


        A range, not a promise: the long end is meant to be rarely beaten. It
        covers model staging (stagingSecondsLow/High) and starting the endpoint
        (startupSecondsLow/High), and nothing after ready: a first request can
        still wait for a worker to start, and running a workflow is not counted.
        atLeast is true when some models had no size to add, or the release was
        never measured, so the bytes and the time are a floor.


        bytesHeld is the release's whole total where this workspace already ran
        the release to ready on the same provider and that provider keeps what
        it staged, and 0 otherwise.


        The estimate can be switched off per workspace. Switched off, this is
        still a 200, with enabled false and no other field: a client shows no
        estimate and says nothing about it, exactly as for a service too old to
        have this route.
      operationId: getDeployEstimate
      parameters:
        - name: releaseId
          in: query
          required: true
          schema:
            type: string
          description: The cut release the deployment would run.
        - name: gpuClass
          in: query
          required: true
          schema:
            type: string
          description: GPU class, as a create's computeConfig.gpuClass.
        - name: region
          in: query
          required: true
          schema:
            type: string
          description: Location, as a create's computeConfig.region.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeployEstimate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/KeyUnverified'
components:
  schemas:
    DeployEstimate:
      type: object
      description: >
        How long a deployment of a release would take to read ready. Every time
        is a range of whole seconds, the short end first; etaSecondsLow/High is
        staging and startup added. With enabled false the estimate is switched
        off and every other field is absent; with enabled true every field but
        unsizedModelCount is present.
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >
            False when the estimate is switched off for this workspace. Not an
            error: show no estimate and say nothing about it.
        bytesTotal:
          type: integer
          format: int64
          description: The release's measured model bytes; 0 when measured is false.
        bytesHeld:
          type: integer
          format: int64
          description: >-
            Of those, the bytes already held, which are copied rather than
            downloaded.
        bytesToFetch:
          type: integer
          format: int64
          description: bytesTotal less bytesHeld, the bytes to download.
        measured:
          type: boolean
          description: >-
            False for a release cut before its models were measured, which has
            no total.
        unsizedModelCount:
          type: integer
          description: >
            How many of the release's models nothing could size, so their bytes
            are missing from bytesTotal. Absent when measured is false.
        atLeast:
          type: boolean
          description: >
            The bytes and the time are a floor: some models had no size, or the
            release was never measured.
        stagingSecondsLow:
          type: integer
          format: int64
        stagingSecondsHigh:
          type: integer
          format: int64
        startupSecondsLow:
          type: integer
          format: int64
          description: From the models landing to ready.
        startupSecondsHigh:
          type: integer
          format: int64
        etaSecondsLow:
          type: integer
          format: int64
        etaSecondsHigh:
          type: integer
          format: int64
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable detail.
  responses:
    BadRequest:
      description: >
        Invalid request (INVALID_REQUEST), or RELEASE_AND_SOURCE_BOTH when an
        update names both a release and a source deployment.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid token (UNAUTHORIZED)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >
        Caller's workspace does not own the resource (FORBIDDEN), or an API key
        was refused because its user may not use it, its workspace was deleted
        or blocked, or its account is on the free tier or is being deleted. The
        message says which.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >
        Unknown id, or not in the caller's workspace (NOT_FOUND). An API key
        also gets this when its workspace no longer exists or its user is no
        longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    KeyUnverified:
      description: >
        The request could not be served now (SERVICE_UNAVAILABLE), and the same
        request may succeed if retried. Either a workspace API key could not be
        verified, because the key check gave no answer, or because the service
        was already checking as many keys as it will at once, overall or from
        the caller's address, which carries Retry-After; or the request ran past
        the service's request deadline, 30 seconds by default and 120 for a
        model add, and was cut off; or a model add could not read another
        deployment's storage to check which disk it mounts. The body's message
        says which.
      headers:
        Retry-After:
          description: >
            Seconds to wait before retrying; sent when the service refused the
            key check because too many were in flight.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: A workspace-scoped Cloud JWT.
    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, and a value that is not a key's shape is
        401. A refused key answers 401, 403 or 404 with its message; a 503 means
        the key could not be checked right now, so retry.

````

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