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

# Quotas

> Get Workspace quota

## Use Cases

* **Monitor API Usage**: Track your credit consumption to avoid hitting limits and ensure uninterrupted service
* **Manage Billing**: Monitor your billing cycle and plan details for better cost management
* **Optimize Performance**: Analyze usage patterns to determine if you need to upgrade your plan


## OpenAPI

````yaml /v1/api/openapi-core.json get /quotas
openapi: 3.1.0
info:
  title: CD's Public API
  description: CD's Public API
  version: 26.58.718
servers:
  - url: https://api.captaindata.com/v1
security:
  - APIKeyHeader: []
paths:
  /quotas:
    get:
      tags:
        - Core
      summary: Get current workspace quota and billing information.
      description: Get Workspace quota
      operationId: get_workspaces
      responses:
        '200':
          description: Successfully retrieved the current workspace quota.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GenericResponse_WorkspaceConsumptionCDV1PublicModel_
              example:
                name: Example Workspace
                uid: 123e4567-e89b-12d3-a456-426614174000
                credits_left: 50
                credits_max: 100
                credits_used: 50
                plan_name: Growth
                current_month_start: '2023-10-01T00:00:00Z'
                current_month_end: '2023-10-31T23:59:59Z'
        '404':
          description: Couldn't find workspace.
          content:
            application/json:
              examples:
                workspace-not-found:
                  summary: Couldn't find the targeted user.
                  value:
                    message: Workspace not found
                    error_label: WORKSPACE_404_NOT_FOUND
                    addtional_info:
                      details: >-
                        Could not find Workspace that has
                        workspace_uid=123e4567-e89b-12d3-a456-426614174000
                workspace-admin-not-found:
                  summary: Couldn't find admin in workspace
                  value:
                    message: Couldn't find admin in workspace
                    error_label: WORKSPACE_ADMIN_404_NOT_FOUND
components:
  schemas:
    GenericResponse_WorkspaceConsumptionCDV1PublicModel_:
      allOf:
        - $ref: '#/components/schemas/WorkspaceConsumptionCDV1PublicModel'
      title: GenericResponse[WorkspaceConsumptionCDV1PublicModel]
    WorkspaceConsumptionCDV1PublicModel:
      properties:
        uid:
          type: string
          format: uuid
          title: Uid
        name:
          type: string
          maxLength: 55
          title: Name
          description: The name of the workspace (maximum 55 characters)
        credits_left:
          type: number
          title: Credits Left
          default: 0
        credits_max:
          type: integer
          title: Credits Max
          default: 0
        credits_used:
          type: number
          title: Credits Used
          default: 0
        plan_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan Name
        current_month_start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Current Month Start
        current_month_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Current Month End
      type: object
      required:
        - name
      title: WorkspaceConsumptionCDV1PublicModel
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key required for authentication. Add your API key in the X-API-Key
        header.

````