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

# The deploy ceilings this workspace is held to

> The caps the caller's workspace is actually held to right now, resolved through the same gate a create and a start run, so a number reported here is the number those refuse at. Every cap is raisable per workspace, so a client must read them rather than hold its own copy. Beside them, used carries the active-deployment count those same checks compare against maxActiveDeployments.

A cap that does not apply is absent from the response. For the worker cap, that is the normal answer on a workspace its plan limits do not apply to yet. Such a workspace has no worker cap at all, and its deployment count is held to a higher default number rather than its plan's. An absent cap is a statement about enforcement as it stands right now, including while a billing check is failing open; a request the client could not complete is not, and a client that got no response shows nothing rather than inferring an absent cap.

A workspace with no credit balance is refused here exactly as a create and a start refuse it, because no count is what stops it and reporting one would name a ceiling that governs nothing.




## OpenAPI

````yaml /openapi-deploy.yaml get /v1/limits
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/limits:
    get:
      summary: The deploy ceilings this workspace is held to
      description: >
        The caps the caller's workspace is actually held to right now, resolved
        through the same gate a create and a start run, so a number reported
        here is the number those refuse at. Every cap is raisable per workspace,
        so a client must read them rather than hold its own copy. Beside them,
        used carries the active-deployment count those same checks compare
        against maxActiveDeployments.


        A cap that does not apply is absent from the response. For the worker
        cap, that is the normal answer on a workspace its plan limits do not
        apply to yet. Such a workspace has no worker cap at all, and its
        deployment count is held to a higher default number rather than its
        plan's. An absent cap is a statement about enforcement as it stands
        right now, including while a billing check is failing open; a request
        the client could not complete is not, and a client that got no response
        shows nothing rather than inferring an absent cap.


        A workspace with no credit balance is refused here exactly as a create
        and a start refuse it, because no count is what stops it and reporting
        one would name a ceiling that governs nothing.
      operationId: getWorkspaceLimits
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceLimits'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/KeyUnverified'
components:
  schemas:
    WorkspaceLimits:
      type: object
      description: >
        The deploy ceilings a workspace is held to. An absent optional field
        means no ceiling of that kind applies rather than that the value is
        unknown: a client that could not reach this route knows nothing and
        shows nothing, while one that read an absent field knows the cap is off.
      required:
        - maxActiveDeployments
        - maxModelStorageGb
        - used
      properties:
        used:
          $ref: '#/components/schemas/WorkspaceLimitsUsed'
        maxActiveDeployments:
          type: integer
          description: >
            How many non-terminal deployments the workspace may hold. Always
            present, because a create is capped on every path. A workspace Comfy
            gave its own number reports that number on every path; without one,
            the number is higher on a workspace its plan limits do not apply to
            yet. A deployment holds one slot however many copies an update
            leaves it running, so an update of a deployment whose serving copy
            runs is admitted at the limit, and one of a stopped deployment
            counts as a start of it. Stopping a deployment frees a slot, as does
            deleting one -- a stopped deployment keeps its endpoint and its
            staged models but holds no slot.
          example: 3
        maxConcurrentWorkers:
          type: integer
          description: >
            How many workers a single deployment may commit at once (its
            computeConfig.max), independent of what the workspace's other
            deployments commit. A workspace Comfy gave its own number reports
            that number on every path, and may then go past the 20 workers every
            other deployment is bounded by. Without one, absent on a workspace
            its plan limits do not apply to yet, where a create and a start
            apply no worker cap at all.
          example: 10
        maxModelStorageGb:
          type: integer
          description: >
            The largest release a deployment that gets its own network volume
            accepts, in gigabytes. A create, start, release update or rollback
            of such a deployment compares a release's own measured model total
            (plus a 5% margin) against it and refuses before anything is
            provisioned when it is over. A deployment that runs where its models
            are not copied onto a volume of its own is judged against a higher
            limit instead, which this field does not report, so a release over
            this number may still deploy. It is not the size of a deployment's
            storage: each volume is sized when the deployment is created to its
            release's measured models plus that margin and 1 GB, never under the
            storage provider's 10 GB minimum and never over this number. A
            release with no measured total, or with some models unmeasured, is
            not refused here and gets a smaller fixed-size volume, or its
            measured total plus that margin and 1 GB where that is larger, since
            a measured total is a floor, not a guarantee.
          example: 3999
    WorkspaceLimitsUsed:
      type: object
      description: >
        What the workspace holds now of the caps beside it, each named for its
        cap without the max. Only the deployment count is reported; nothing is
        counted against the worker ceiling or the model storage limit here.
      required:
        - activeDeployments
      properties:
        activeDeployments:
          type: integer
          minimum: 0
          description: >
            The count maxActiveDeployments is checked against at a create and a
            start, read by the same function those run, so a client shows this
            rather than counting the deployment list. A deployment counts once
            however many copies it has, and a stopped deployment whose
            replacement copy is still queued counts, which a count of stopped
            and running rows in the list misses. Reading N of N means the next
            create is refused; a start or an update of a deployment whose
            serving copy runs is still admitted at the limit. Like the cap check
            itself, it is read without a lock, so concurrent creates can move it
            between this read and the next write.
          example: 1
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable detail.
    PaymentRequiredError:
      type: object
      description: >
        A 402 body. error is always PAYMENT_REQUIRED; reason says which gate
        refused, because the two are acted on differently and a status alone
        cannot tell them apart.
      required:
        - error
        - reason
      properties:
        error:
          type: string
          description: Machine-readable error code. Always PAYMENT_REQUIRED.
        message:
          type: string
          description: Human-readable detail.
        reason:
          type: string
          description: >
            no_credit_balance: the workspace has neither an active subscription
            nor a positive credit balance, so subscribing or topping up clears
            it. spend_blocked: the spend gate refused this workspace -- a manual
            block or an exhausted workspace/project/user spend cap -- which
            topping up alone may not clear. capacity_limit: a compute move would
            exceed the workspace deployment or worker limit.
          enum:
            - no_credit_balance
            - spend_blocked
            - capacity_limit
  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'
    PaymentRequired:
      description: >
        The request was refused on billing grounds (PAYMENT_REQUIRED). Two
        different gates answer with this status, so the body carries a reason
        naming which one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredError'
    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.