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

# Get a deployment's status

> Returns the deployment's status, its endpoint URL once ready, and a sentence for the customer saying what went wrong if it failed. The UI polls this and stops once the status is final.




## OpenAPI

````yaml /openapi-deploy.yaml get /v1/deployments/{id}
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/deployments/{id}:
    get:
      summary: Get a deployment's status
      description: >
        Returns the deployment's status, its endpoint URL once ready, and a
        sentence for the customer saying what went wrong if it failed. The UI
        polls this and stops once the status is final.
      operationId: getDeployment
      parameters:
        - $ref: '#/components/parameters/PathID'
        - name: picked
          in: query
          required: false
          description: >-
            Set by the Cloud editor's backend when a person picks this
            deployment or makes it the workspace default; the pick is remembered
            only when the request comes on the token the editor's backend mints
            for that pick, and ignored from any other caller. Has no effect on
            the answer.
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
        '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:
  parameters:
    PathID:
      name: id
      in: path
      required: true
      schema:
        type: string
  schemas:
    Deployment:
      type: object
      required:
        - id
        - status
        - releaseId
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        projectId:
          type: string
          description: >-
            The project the deployment belongs to, set when it is created and
            never changed. Absent for a deployment in the workspace's default
            project. It says where the deployment's runs and spend are counted,
            not what the caller may do to it.
        name:
          type: string
          nullable: true
          description: >-
            The deployment's name, unique among its build's live deployments;
            null on a deployment created before names until it is given one.
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        releaseId:
          type: string
          description: The cut release this deployment runs.
        computeConfig:
          $ref: '#/components/schemas/ComputeConfig'
        requestedComputeConfig:
          allOf:
            - $ref: '#/components/schemas/ComputeConfig'
          description: >-
            Target compute requested by a pending move or stored for the next
            start. Absent after cutover or cancellation. While the source is
            ready, computeConfig remains its serving settings until cutover. A
            stopped or failed deployment also exposes its next-start settings in
            computeConfig.
        editor:
          type: boolean
          description: >-
            Whether the deployment keeps a CPU server answering its custom
            nodes' own routes in the editor. Answered on a read, a rename and an
            editor change; absent on the answer to a create or a compute edit.
        endpointUrl:
          type: string
          nullable: true
          description: The live endpoint once the deployment is ready; null otherwise.
        error:
          type: string
          nullable: true
          description: >-
            A sentence for the customer saying what went wrong and what to do:
            why the deployment failed when the status is failed, or that the
            last stop did not finish and should be retried when the status is
            stop_failed; null otherwise. It never carries the GPU provider's own
            error, and is not meant to be parsed.
        stopReason:
          type: string
          nullable: true
          enum:
            - user
            - credits
            - policy
          description: >-
            Why the deployment was stopped, set when the status is stopped: user
            (explicit stop), credits (out of funds), or policy (spend gate).
            Lets the UI show an involuntary credit stop differently from a user
            stop. Null when the deployment was never stopped or was started
            again.
        serving:
          $ref: '#/components/schemas/ServingState'
        progress:
          $ref: '#/components/schemas/DeployProgress'
        waitingForBuild:
          type: string
          description: >-
            The release whose build this deployment waits for before it starts.
            Present only while the status is queued for that build; absent
            otherwise. Answered on a read and a move.
        revision:
          type: integer
          nullable: true
          description: >-
            The deployment's current revision, 1 at its create and one more per
            update. Answered on a read and a move; absent on the answer to a
            compute edit, and for a deployment with no record or whose serving
            copy is gone.
        pendingUpdate:
          $ref: '#/components/schemas/PendingUpdate'
        releases:
          type: array
          description: >-
            Every release the deployment runs a copy of, the one it serves, each
            it keeps from an earlier update and one an update waits on, with
            what each costs. Answered on a read of one deployment.
          items:
            $ref: '#/components/schemas/DeploymentRelease'
        addedModels:
          type: array
          description: >-
            The model files added straight to the deployment, as the models
            route lists them. Answered on a read of one deployment that has any,
            and absent where it has none.
          items:
            $ref: '#/components/schemas/DeploymentModel'
        modelsAddEnabled:
          type: boolean
          description: >-
            Always true on a read of one deployment, as the models route's
            addEnabled. Not whether this deployment can take the file now, and
            not whether a file can be removed.
        deletedAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            When this deployment was deleted, stamped once its compute was
            released; null while it is live. A deleted deployment is kept rather
            than removed, so it stays listed and fetchable as the record of what
            was deleted, keeping the status its release settled it at (normally
            stopped). It cannot be started again.
        deletedBy:
          type: string
          nullable: true
          description: >-
            The user who deleted it, so a deleted deployment carries who and not
            only when. Null while it is live, and null when the delete had no
            acting user behind it.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    DeploymentStatus:
      type: string
      description: >-
        Lifecycle state. unhealthy is a recoverable post-ready state: the
        deployment was serving but its endpoint degraded or vanished, and the
        control plane will move it back to ready if it recovers. stop_failed
        means a stop ran but could not release the compute, so the deployment
        may still be holding (and billing for) its endpoint; it is not terminal,
        and stopping it again retries the release. stopped and failed are
        terminal.
      enum:
        - queued
        - provisioning
        - starting
        - ready
        - unhealthy
        - stopping
        - stop_failed
        - stopped
        - failed
    ComputeConfig:
      type: object
      description: >
        The requested serverless shape. The endpoint autoscales between min and
        max workers on demand (min 0 scales to zero when idle). region names
        where the deployment runs, at any level the catalog lists: the endpoint
        and its network volume stay bound to that placement. Changing GPU class
        or region creates a separate copy while preserving the deployment id and
        URL. Deployment reads report serving settings while ready;
        stopped/failed reads report accepted next-start settings when a compute
        request is stored.
      required:
        - gpuClass
        - region
      properties:
        gpuClass:
          type: string
          description: >
            GPU class the deployment runs on, as the catalog publishes it (e.g.
            rtx-pro-6000-server). Creating a deployment accepts a provider's own
            card id too and records the class covering it. Editing one does not
            translate either value: it compares what you send against what the
            deployment stores, so send back the class that deployment reports.
        region:
          type: string
          description: >
            Location the deployment runs in, at any level the catalog lists
            (e.g. north-america, us-central). It is recorded exactly as sent and
            fixes where each copy's models volume is created and staged.
            Changing it prepares a separate copy while preserving the deployment
            id and URL.
        min:
          type: integer
          minimum: 0
          description: Minimum warm workers; 0 scales to zero when idle.
        max:
          type: integer
          minimum: 1
          description: Maximum workers the endpoint scales up to.
        keepWarmSeconds:
          type: integer
          minimum: 30
          maximum: 1200
          description: >
            Seconds a worker stays up after its last job before it is released,
            so a job arriving inside the window meets a warm worker instead of a
            cold start. That idle time is billed. Defaults to 180 when omitted,
            and a read reports 180 for a deployment that never set it. A value
            outside 30 to 1200 is refused with a 400; twenty minutes is the
            longest window every GPU provider can hold. Applied when compute is
            provisioned, so changing it on a ready deployment is refused: edit
            while stopped, or stop and start. On an update, omitting the field
            keeps the stored value.
        startupArgs:
          type: array
          maxItems: 16
          items:
            type: string
            maxLength: 64
          description: >
            Extra ComfyUI command-line flags the worker adds to its main.py
            launch, one token per item (e.g. ["--highvram"] or
            ["--reserve-vram", "2"]). Only the service's allowlist is accepted:
            the VRAM strategy (--gpu-only, --highvram, --lowvram, --novram,
            --reserve-vram N, --vram-headroom N, --disable-smart-memory,
            --async-offload [N], --disable-async-offload, --enable-dynamic-vram,
            --disable-dynamic-vram, --disable-pinned-memory, --fast-disk,
            --mmap-torch-files, --disable-mmap), precision (--force-fp32,
            --force-fp16, --fp32-unet, --fp64-unet, --bf16-unet, --fp16-unet,
            --fp8_e4m3fn-unet, --fp8_e5m2-unet, --fp8_e8m0fnu-unet, --fp16-vae,
            --fp32-vae, --bf16-vae, --cpu-vae, --fp16-text-enc, --fp32-text-enc,
            --bf16-text-enc, --fp8_e4m3fn-text-enc, --fp8_e5m2-text-enc,
            --fp16-intermediates, --force-channels-last), the attention backend
            (--use-pytorch-cross-attention, --use-sage-attention,
            --use-flash-attention, --use-split-cross-attention,
            --use-quad-cross-attention, --disable-xformers,
            --force-upcast-attention, --dont-upcast-attention), the node cache
            (--cache-classic, --cache-none, --cache-lru N, --cache-ram [GB
            [GB]]) and performance (--fast [features], --deterministic,
            --cuda-malloc, --disable-cuda-malloc, --disable-cuda-graphs).
            Anything else, including a flag that changes where ComfyUI listens
            or reads files, is refused with a 400 naming the token. Values are
            checked too: gigabyte amounts (--reserve-vram, --vram-headroom,
            --cache-ram) are decimal numbers, counts (--cache-lru,
            --async-offload) are whole numbers, and --fast takes ComfyUI's
            feature names. The field is accepted only where the environment has
            enabled it, once the worker that reads it is live. The flag must
            exist in the build's own ComfyUI version, or the worker fails to
            boot and the deployment fails; ComfyUI's own error is then readable
            from GET /v1/deployments/{id}/logs. Applied when compute is
            provisioned, so changing it on a ready deployment is refused: edit
            while stopped, or stop and start. On an update, omitting the field
            keeps the stored flags and an empty array clears them.
    ServingState:
      type: object
      nullable: true
      description: >-
        What the deployment's compute is actually doing right now, as of the
        last control-plane sample. Descriptive only: status is the lifecycle
        signal and is never derived from these counts, so a sample that looks
        healthy beside an unhealthy status is the two answering different
        questions rather than a disagreement. Present once the control plane has
        sampled this deployment's current compute, which usually happens within
        a sampling interval of that compute appearing, so a booting deployment
        can show workers coming up. A stopped deployment keeps its last sample
        rather than clearing it, and so does a deleted one. Null before that
        first sample, and for the whole life of a deployment on a GPU provider
        that is not sampled where it runs. Null again once a deployment fails,
        or once it is started again, which discards the sample taken before it.
        The counts are a snapshot, not a time series, and can be stale: a
        deployment whose endpoint stopped answering keeps its last sample, so
        read sampledAt and age it out rather than trusting counts of unknown
        vintage.
      required:
        - workers
        - capacity
        - jobsInQueue
        - sampledAt
      properties:
        workers:
          $ref: '#/components/schemas/WorkerCounts'
        capacity:
          $ref: '#/components/schemas/WorkerCapacity'
        jobsInQueue:
          type: integer
          description: Jobs accepted by the endpoint and not yet picked up by a worker.
        sampledAt:
          type: string
          format: date-time
          description: When the control plane took this sample.
    DeployProgress:
      type: object
      nullable: true
      description: >-
        Where a deployment that is coming up has got to, as of updatedAt.
        Present while the status is provisioning or starting and null otherwise:
        a ready deployment has none, and neither has a stopped or failed one.
        Descriptive only: status is the lifecycle signal, and the events
        timeline is the history of what finished, where this is the one object
        that says what is happening now. It is rewritten every few seconds in
        every step, the two that count nothing included, so poll the deployment
        to follow it. The writes are best-effort and never hold a deploy up, so
        a sample can be missed; read updatedAt and treat an old one as stale
        rather than as a deploy that stopped. The byte counts, the rate and the
        time left are present only while step is staging_models. Staging that is
        retried starts a new attempt and counts again from what is already in
        place, so bytesDone can fall between two reads that straddle a retry.
      required:
        - step
        - attempt
        - startedAt
        - updatedAt
      properties:
        step:
          type: string
          enum:
            - staging_models
            - creating_endpoint
            - waiting_for_worker
          description: >-
            staging_models while the release's models are copied onto the
            deployment's storage, creating_endpoint while the GPU provider is
            asked for the endpoint, waiting_for_worker while the first worker
            pulls the image, loads the models and starts ComfyUI.
        modelsDone:
          type: integer
          description: Models in place, the ones already there before this deploy included.
        modelsTotal:
          type: integer
          description: Models in the release.
        bytesDone:
          type: integer
          format: int64
          description: Bytes this attempt has brought onto the deployment's storage.
        bytesTotal:
          type: integer
          format: int64
          description: >-
            Bytes this attempt has to bring: the release's measured model size
            less what it found already in place, so a redeploy onto storage that
            holds every model reads 0. Absent for a release whose models were
            never measured.
        bytesTotalIsFloor:
          type: boolean
          description: >-
            True when bytesTotal is a lower bound rather than the total: the
            release holds a model nothing could size, or this attempt has
            already moved more than the release's recorded size, which is a
            floor by construction. It then rises with bytesDone, and no time
            left is given.
        currentModel:
          type: string
          description: The model being staged now, as its path on the deployment's storage.
        bytesPerSecond:
          type: integer
          format: int64
          description: >-
            Average rate since this attempt's first byte moved, the read-back
            that verifies each model included; the time a provider spends
            booting before the copy begins is not in it. Absent until bytes have
            been moving for a few seconds, and once every byte is in while the
            models are put in place, since nothing is moving then.
        etaSeconds:
          type: integer
          format: int64
          description: >-
            Seconds of staging left: the bytes still to move at the copy's rate,
            plus the time the provider is known to take putting the models in
            place after the last byte lands, which counts down once every byte
            is in. The rate is measured over the last minute of the time the
            copy spent counting bytes (all of it, before there is a minute), up
            to the last byte counted rather than updatedAt, and leaves out the
            part of a pause in the copy past its first ten seconds that the
            bytes after it do not account for, so a pause holds the time left
            rather than raising it. It is not bytesPerSecond. Where staging also
            waits on something built beside the copy, such as the release image,
            it is at least the time until that is expected to end, with
            bytesTotal 0 too. Staging only: creating the endpoint and the first
            worker's cold start come after it. Absent while bytes move until the
            rate has ten seconds of the copy to measure, whenever bytesTotal is
            absent or a floor, and once every byte is in, or with none to move,
            unless one of those times has not run out.
        placingModels:
          type: boolean
          description: >-
            Present and true once every byte of the models has landed and the
            step is finishing: the models are being put in place, and a release
            image built beside the upload may still be building. The step stays
            staging_models, and etaSeconds, where given, counts down the longer
            of the two. Absent before the last byte, while bytesTotal is absent
            or a floor, and with no byte to move.
        attempt:
          type: integer
          description: >-
            Which try of this step is running, from 1. Above 1 means it was
            retried.
        startedAt:
          type: string
          format: date-time
          description: When this attempt of the step began.
        updatedAt:
          type: string
          format: date-time
          description: >-
            When this object was last written. Advances every few seconds in
            every step while the deploy is alive, so one that has stopped
            advancing is a stale sample.
    PendingUpdate:
      type: object
      nullable: true
      description: >-
        An update that waits for its release's running copy to be ready, or an
        unfinished cancellation of that copy. Cancellation keeps the original
        baseRevision and since so existing clients can retry stop/delete after
        dispatch failure. An unfinished cancellation reads failed, keeping its
        dismissal available even while the copy is stopping. Null after the move
        or cancellation finishes.
      required:
        - releaseId
        - baseRevision
        - status
        - since
      properties:
        releaseId:
          type: string
          description: The release the deployment moves to once it is ready.
        baseRevision:
          type: integer
          description: The revision the update was asked against.
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        since:
          type: string
          format: date-time
          description: When the update was asked for.
        instanceGroupId:
          type: string
          description: The particular copy, distinguishing copies of the same release.
        computeConfig:
          $ref: '#/components/schemas/ComputeConfig'
        kind:
          type: string
          description: >-
            update, compute for a placement move, or rollback for a rollback
            waiting on its release's copy. Open: clients tolerate values they do
            not know.
        fromRevision:
          type: integer
          description: The revision a waiting rollback restores; absent on an update.
        waitingForBuild:
          type: string
          description: >-
            The release whose build the update's copy waits for before it
            starts. Present only while that copy is queued for the build; absent
            otherwise, and on an unfinished cancellation.
    DeploymentRelease:
      type: object
      required:
        - releaseId
        - status
        - current
      properties:
        releaseId:
          type: string
        instanceGroupId:
          type: string
          description: >-
            The particular copy; one release may have several during a compute
            move.
        computeConfig:
          $ref: '#/components/schemas/ComputeConfig'
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        current:
          type: boolean
          description: Whether the deployment serves this release; the others are kept.
        storageMonthlyCents:
          type: integer
          format: int64
          nullable: true
          description: >-
            What the release's model storage costs a month while it is kept, in
            US cents, at the rate card's network storage price for the size its
            disk last billed at. Before its first storage charge, the size a
            create gives it: the volume a create sizes, the fixed fallback size
            where any of its models is unmeasured, or where its provider bills
            the bytes a disk holds, the bytes its models hold. Null where the
            release is gone, where a byte-billed release has a model unmeasured,
            or where the hourly teardown stopped the release and deleted its
            disk, and no hour that began after its stop has billed one.
        warmHourlyCents:
          type: integer
          format: int64
          nullable: true
          description: >-
            What one warm worker of the release's GPU class costs an hour, in US
            cents, the list price the catalog gives the class. A release with a
            minimum of zero workers bills this only while a worker is up, which
            includes the keepWarmSeconds window after its last job. Still
            present once the class is closed to new deployments and gone from
            the rate card; null where no catalog entry prices the class.
    DeploymentModel:
      type: object
      required:
        - id
        - type
        - filename
        - status
        - sizeBytes
      properties:
        id:
          type: string
        type:
          type: string
          description: The model folder the file is in.
        filename:
          type: string
        status:
          type: string
          enum:
            - adding
            - ready
            - failed
            - removing
          x-enum-varnames:
            - DeploymentModelAdding
            - DeploymentModelReady
            - DeploymentModelFailed
            - DeploymentModelRemoving
          description: >-
            adding until the deployment's workers can use the file, ready once
            they can, failed where it could not be added, and removing once a
            removal was asked.
        failure:
          type: string
          description: >-
            Why a failed file was not added, for the log; absent otherwise. Not
            for display: a surface says "<file> was not added to this
            deployment. Remove it and add it again."
        sizeBytes:
          type: integer
          format: int64
          description: The file's size as its upload declared it.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable detail.
    WorkerCounts:
      type: object
      description: >-
        Deprecated: read capacity instead. This is the GPU provider's own
        accounting and is removed in a later release. Workers by state, as one
        GPU provider counts them. idle, ready and running are workers the
        provider is holding for this deployment; initializing is coming up;
        throttled means the provider has no capacity to place the worker and
        unhealthy means it is placed but failing. Read them as what the fleet is
        doing, never as why status says what it says: status comes from the
        provider's own answer about whether the deployment can serve, so a
        deployment can read unhealthy with every count at zero, or carry a
        non-zero idle count while unhealthy. A provider that does not measure a
        state reports zero for it, so a zero is not evidence that no such worker
        exists. A provider that cannot tell a worker still booting from a warm
        one counts it under idle rather than initializing, so idle is an upper
        bound on what can take a job this second. A scale-to-zero deployment
        sitting at all-zero is idle, not broken.
      required:
        - idle
        - initializing
        - ready
        - running
        - throttled
        - unhealthy
      properties:
        idle:
          type: integer
        initializing:
          type: integer
        ready:
          type: integer
        running:
          type: integer
        throttled:
          type: integer
        unhealthy:
          type: integer
    WorkerCapacity:
      type: object
      description: >-
        Workers by what they were doing when sampled, in the same words on every
        GPU provider. ready could take a job, busy was running one, starting was
        coming up. A provider that cannot tell a worker still booting from a
        warm one counts it as ready, so ready is an upper bound. These describe
        the sample, not whether the deployment takes jobs: a stopped deployment
        keeps its last sample, and status says whether it serves. A
        scale-to-zero deployment sitting at all-zero is idle, not broken.
      required:
        - ready
        - busy
        - starting
      properties:
        ready:
          type: integer
        busy:
          type: integer
        starting:
          type: integer
  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.