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

# Get the limits

> Returns the limits of the workspace plan and the current use of each limit. A create above a limit answers `402 billing_required`, `403 size_not_allowed`, or `429 start_limit`. Needs the `sandboxes:read` scope.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/limits
openapi: 3.1.0
info:
  title: VMS API
  version: 1.0.0
  description: >-
    The public API of a VMS workspace. Each request needs an API key of the
    workspace in the Authorization header.
servers:
  - url: https://vms.dev/api
    description: The VMS API
security:
  - apiKey: []
paths:
  /v1/limits:
    get:
      tags:
        - Limits
      summary: Get the limits
      description: >-
        Returns the limits of the workspace plan and the current use of each
        limit. A create above a limit answers `402 billing_required`, `403
        size_not_allowed`, or `429 start_limit`. Needs the `sandboxes:read`
        scope.
      operationId: getLimits
      responses:
        '200':
          description: The limits and their use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Limits'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The API key is missing, not correct, revoked, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API key does not have the scope of the endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: The API key sent more than 1,200 requests in one minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Limits:
      type: object
      properties:
        plan:
          anyOf:
            - type: string
              enum:
                - plan-20
                - plan-100
                - plan-500
                - plan-2000
                - trial
            - type: 'null'
          description: The plan in use. Null when the workspace has no plan.
          example: plan-20
        billingReview:
          type: boolean
          description: True while a payment review stops new starts. Contact support.
        sizes:
          type: array
          items:
            $ref: '#/components/schemas/SandboxSize'
          description: The sizes that you can create.
        concurrentSandboxes:
          $ref: '#/components/schemas/LimitUse'
          description: >-
            The sandboxes that are creating, starting, running, or stopping at
            the same time.
        startsPerMinute:
          $ref: '#/components/schemas/LimitUse'
          description: Creates and resumes in the last 60 seconds.
        startsPerDay:
          $ref: '#/components/schemas/LimitUse'
          description: Creates and resumes in the last 24 hours.
        savedSnapshots:
          $ref: '#/components/schemas/LimitUse'
          description: The stopped sandboxes that keep their saved files.
        templates:
          $ref: '#/components/schemas/LimitUse'
          description: >-
            The templates that are saving or ready. The plan includes the limit.
            Each template above it costs $0.04 each day.
        autoStopSeconds:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: 'null'
          description: >-
            The longest time that a sandbox runs before it stops on its own.
            Null when there is no limit.
          example: 14400
        trialUnitHours:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: 'null'
          description: >-
            The capacity-unit hours that the trial includes. Null on a paid
            plan.
          example: 60
      required:
        - plan
        - billingReview
        - sizes
        - concurrentSandboxes
        - startsPerMinute
        - startsPerDay
        - savedSnapshots
        - templates
        - autoStopSeconds
        - trialUnitHours
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: no_capacity
            message:
              type: string
            requestId:
              type:
                - string
                - 'null'
            retryAfterSeconds:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            sandboxId:
              description: The sandbox that the error is about.
              type: string
          required:
            - code
            - message
            - requestId
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    SandboxSize:
      type: string
      enum:
        - small
        - medium
        - large
        - xlarge
      description: The vCPU, RAM, and disk of a sandbox.
    LimitUse:
      type: object
      properties:
        limit:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        used:
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - limit
        - used
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: An API key that starts with vms_. Make one in Settings > API keys.

````

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