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

A cap that does not apply is absent from the response, which is the normal answer for a workspace billing did not resolve: it may keep any number of builds, and its running-build cap is a fixed default rather than the configured one. 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.

Beside the caps, used carries what the workspace holds against each one, counted by the query the create and the cut compare to the cap, so a client can show "3 of 20". It is present on every 200, including when a cap is absent.

A workspace an operator blocked is refused here with 402, exactly as a create and a cut refuse it, because no count is what stops it and reporting one would name a ceiling that governs nothing. A workspace with no credit is not refused; it is held to the Standard plan's caps.




## OpenAPI

````yaml /openapi-builder.yaml get /v1/limits
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/limits:
    get:
      summary: The build 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 cut 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.


        A cap that does not apply is absent from the response, which is the
        normal answer for a workspace billing did not resolve: it may keep any
        number of builds, and its running-build cap is a fixed default rather
        than the configured one. 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.


        Beside the caps, used carries what the workspace holds against each one,
        counted by the query the create and the cut compare to the cap, so a
        client can show "3 of 20". It is present on every 200, including when a
        cap is absent.


        A workspace an operator blocked is refused here with 402, exactly as a
        create and a cut refuse it, because no count is what stops it and
        reporting one would name a ceiling that governs nothing. A workspace
        with no credit is not refused; it is held to the Standard plan's caps.
      operationId: getWorkspaceLimits
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceLimits'
        '402':
          $ref: '#/components/responses/SubscriptionRequired'
components:
  schemas:
    WorkspaceLimits:
      type: object
      description: >
        The build 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:
        - maxRunningBuilds
        - used
      properties:
        maxBuilds:
          type: integer
          description: >
            How many builds the workspace may keep at once. Deleting one frees a
            slot. The same number on every plan: a build is a definition and
            costs nothing to keep, so plans differ on releases, not builds.
            Absent when billing could not resolve the workspace and no build cap
            has been turned on for it, which is when a create applies no count
            cap at all.
          example: 50
        maxRunningBuilds:
          type: integer
          description: >
            How many of the workspace's releases may be building at once, which
            is what a cut is refused on -- not how many builds it may keep,
            which is maxBuilds. Always present, because a cut is capped on every
            path. Where billing resolves the workspace, with or without credit,
            it is the configured number, the same on every plan. Where billing
            does not resolve it, a fixed default applies instead, which a
            per-workspace build cap can only lower.
          example: 50
        maxTotalReleases:
          type: integer
          description: >
            How many build versions the workspace may hold, counting every
            status. A build version costs to keep whether or not anything
            deploys it, which is what this bounds; maxRunningBuilds bounds
            concurrent building instead. The number is the workspace's plan's
            own where the plan has one (Standard and Creator 5, Pro 10, Team
            40), and the deployment's default for any other plan. Comfy can also
            save a number from 1 to 100 for one workspace, which replaces the
            one above from its next request; a saved number outside that range
            is ignored. A workspace Comfy has set a number for in code gets that
            number or the one above, whichever is higher. Enforced wherever it
            is present, whether or not billing resolves the workspace. Deleted
            build versions do not count, so a workspace that reaches this number
            makes room by deleting one, or by moving to a plan with a higher
            one. Absent means no ceiling, the same way an absent maxBuilds does,
            which is what a deployment that has set the cap to zero reports.
            That zero turns the cap off for every workspace, including one with
            its own number.
          example: 5
        used:
          $ref: '#/components/schemas/WorkspaceLimitsUsed'
    WorkspaceLimitsUsed:
      type: object
      description: >
        How much of each cap the workspace holds right now, counted by the same
        query the create and the cut compare to the cap, so once
        used.totalReleases reaches maxTotalReleases a cut that would make a new
        build version is refused. An identical re-cut of a definition that
        already has a build version is answered with that version before any cap
        is checked, so it is accepted even at the cap. Always present, every
        count included, even where the cap beside it is absent: an absent cap
        means no ceiling, not that nothing is counted.
      required:
        - builds
        - runningBuilds
        - totalReleases
      properties:
        builds:
          type: integer
          description: >
            How many builds the workspace keeps, what maxBuilds bounds. Deleted
            builds do not count.
          example: 3
        runningBuilds:
          type: integer
          description: >
            How many of the workspace's releases are building now (queued,
            building or stopping), what maxRunningBuilds bounds. A release
            deleted while its build runs still counts until the build finishes,
            because deleting a build version does not stop its build.
          example: 1
        totalReleases:
          type: integer
          description: >
            How many build versions the workspace holds, counting every status,
            what maxTotalReleases bounds. Deleted build versions do not count.
          example: 3
    PaymentRequiredError:
      type: object
      description: >
        A 402 body. error is always PAYMENT_REQUIRED; reason says which gate
        refused. This service refuses only a workspace an operator blocked, so
        every 402 it sends carries spend_blocked -- the enum matches the deploy
        API's so one client can branch on one vocabulary across both.
      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. No longer sent by this service. spend_blocked: an operator
            blocked this workspace, which topping up does not clear.
          enum:
            - no_credit_balance
            - spend_blocked
  responses:
    SubscriptionRequired:
      description: >
        An operator blocked the workspace (PAYMENT_REQUIRED, reason
        spend_blocked). A workspace with no credit is not refused here; it is
        held to the Standard plan's caps and asked for credit when it deploys.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredError'
  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.