---
updatedAt: 2026-05-26T14:57:33.000Z
agentTools:
  projectIndex: https://docs.cast.ai/llms.txt
---

# Get quota usage.

Gets current quota usage for the organization and the authenticated user.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://api.cast.ai/",
      "description": "US endpoint"
    },
    {
      "url": "https://api.eu.cast.ai/",
      "description": "EU endpoint"
    }
  ],
  "info": {
    "title": "AI Enabler",
    "version": "0.0.1"
  },
  "security": [
    {
      "BearerAuth": []
    },
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/ai-optimizer/v1beta/organizations/{organizationId}/quotas:usage": {
      "get": {
        "tags": [
          "QuotaAPI"
        ],
        "summary": "Get quota usage.",
        "description": "Gets current quota usage for the organization and the authenticated user.",
        "operationId": "QuotaAPI_GetQuotaUsage",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "The ID of the organization.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaUsage"
                }
              }
            }
          },
          "default": {
            "description": "Default error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    },
    "schemas": {
      "GoogleProtobufAny": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string",
            "description": "The type of the serialized message."
          }
        },
        "additionalProperties": true,
        "description": "Contains an arbitrary serialized message along with a @type that describes the type of the serialized message."
      },
      "QuotaUsage": {
        "type": "object",
        "properties": {
          "orgUsage": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ResourceUsage"
              }
            ],
            "description": "Organization-level resource usage."
          },
          "userUsage": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ResourceUsage"
              }
            ],
            "description": "User-level resource usage for the authenticated user."
          }
        },
        "description": "Quota usage for the organization and the authenticated user."
      },
      "ResourceUsage": {
        "type": "object",
        "properties": {
          "currentSandboxes": {
            "readOnly": true,
            "type": "integer",
            "description": "Current number of active sandboxes.",
            "format": "int32"
          },
          "currentCpuMillicores": {
            "readOnly": true,
            "type": "string",
            "description": "Current total CPU in millicores (e.g., 1000 = 1 core, 500 = 0.5 cores)."
          },
          "currentRamBytes": {
            "readOnly": true,
            "type": "string",
            "description": "Current total RAM in bytes in use."
          },
          "maxSandboxes": {
            "readOnly": true,
            "type": "integer",
            "description": "Maximum allowed sandboxes (always positive).",
            "format": "int32"
          },
          "maxCpuMillicores": {
            "readOnly": true,
            "type": "string",
            "description": "Maximum allowed CPU in millicores (always positive, e.g., 1000 = 1 core, 500 = 0.5 cores)."
          },
          "maxRamBytes": {
            "readOnly": true,
            "type": "string",
            "description": "Maximum allowed RAM in bytes (always positive)."
          },
          "currentPvcSizeBytes": {
            "readOnly": true,
            "type": "string",
            "description": "Current total PVC size in bytes in use."
          },
          "maxPvcSizeBytes": {
            "readOnly": true,
            "type": "string",
            "description": "Maximum allowed PVC size in bytes (always positive)."
          }
        },
        "description": "Resource usage represents current consumption and limits for a resource scope."
      },
      "Status": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].",
            "format": "int32"
          },
          "message": {
            "type": "string",
            "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client."
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleProtobufAny"
            },
            "description": "A list of messages that carry the error details.  There is a common set of message types for APIs to use."
          }
        },
        "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
      }
    }
  },
  "tags": [
    {
      "name": "QuotaAPI",
      "description": "Provides the API for querying session quota usage and limits."
    }
  ]
}
```