> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get routine capacity

> Returns the environment routine limit and remaining capacity for this owner and agent bucket, counting enabled and disabled non-deleted flows. Omit agentId (or use unassigned) for the unassigned bucket. This is advisory; create and clone enforce admission under a bucket lock.



## OpenAPI

````yaml /api-reference/workflows.yaml get /flows/capacity
openapi: 3.1.0
info:
  title: Workflows
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /flows/capacity:
    get:
      tags:
        - Flows
      summary: Get routine capacity
      description: >-
        Returns the environment routine limit and remaining capacity for this
        owner and agent bucket, counting enabled and disabled non-deleted flows.
        Omit agentId (or use unassigned) for the unassigned bucket. This is
        advisory; create and clone enforce admission under a bucket lock.
      operationId: getFlowCapacity
      parameters:
        - description: >-
            Agent bucket UUID or unassigned. Omit on list to include every
            bucket; omit on capacity for unassigned.
          in: query
          name: agentId
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - enum:
                  - unassigned
                type: string
            description: >-
              Agent bucket UUID or unassigned. Omit on list to include every
              bucket; omit on capacity for unassigned.
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/FlowCapacity'
                required:
                  - data
                type: object
          description: Routine capacity retrieved
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.workflows.flows.capacity();

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.workflows.flows.capacity()
            print(response.data)
components:
  schemas:
    FlowCapacity:
      additionalProperties: false
      properties:
        included:
          minimum: 0
          type: integer
        remaining:
          minimum: 0
          type: integer
        status:
          $ref: '#/components/schemas/FlowCapacityStatus'
      required:
        - included
        - remaining
        - status
      type: object
    FlowCapacityStatus:
      enum:
        - available
        - exhausted
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

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