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

# Get Spending Caps

> Get current spending cap configuration.

Returns spending cap settings including budget limits, alert thresholds,
and current spending status.

**Requirements:**
- Read permission

**Example:**
```python
response = await client.get("/v1/organizations/billing/spending-caps")
print(f"Monthly budget: ${response['monthly_spending_budget_usd']}")
print(f"Hard cap enabled: {response['hard_cap_enabled']}")
print(f"Current spending: ${response['current_spending_usd']}")
```



## OpenAPI

````yaml get /v1/organizations/billing/spending-caps
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/organizations/billing/spending-caps:
    get:
      tags:
        - Organization Billing
      summary: Get Spending Caps
      description: |-
        Get current spending cap configuration.

        Returns spending cap settings including budget limits, alert thresholds,
        and current spending status.

        **Requirements:**
        - Read permission

        **Example:**
        ```python
        response = await client.get("/v1/organizations/billing/spending-caps")
        print(f"Monthly budget: ${response['monthly_spending_budget_usd']}")
        print(f"Hard cap enabled: {response['hard_cap_enabled']}")
        print(f"Current spending: ${response['current_spending_usd']}")
        ```
      operationId: get_spending_caps_v1_organizations_billing_spending_caps_get
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendingCapsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SpendingCapsResponse:
      properties:
        monthly_spending_budget:
          anyOf:
            - type: integer
            - type: 'null'
          title: Monthly Spending Budget
          description: Soft spending limit in USD cents (null = unlimited)
          examples:
            - 10000
            - 50000
            - 100000
        monthly_spending_budget_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Monthly Spending Budget Usd
          description: Soft spending limit in USD
          examples:
            - 100
            - 500
            - 1000
        spending_alert_thresholds:
          items:
            type: integer
          type: array
          title: Spending Alert Thresholds
          description: Percentage thresholds for spending alerts
          examples:
            - - 50
              - 75
              - 90
              - 100
        spending_alerts_enabled:
          type: boolean
          title: Spending Alerts Enabled
          description: Whether spending alerts are enabled
          default: true
        spending_alerts_sent:
          items:
            type: integer
          type: array
          title: Spending Alerts Sent
          description: Alert thresholds triggered in current billing cycle
          examples:
            - - 50
              - 75
        hard_spending_cap:
          anyOf:
            - type: integer
            - type: 'null'
          title: Hard Spending Cap
          description: Hard spending limit in USD cents (null = no hard cap)
          examples:
            - 50000
            - 100000
            - 500000
        hard_spending_cap_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Hard Spending Cap Usd
          description: Hard spending limit in USD
          examples:
            - 500
            - 1000
            - 5000
        hard_cap_enabled:
          type: boolean
          title: Hard Cap Enabled
          description: Whether hard spending cap is enforced
          default: false
        current_spending_cents:
          type: integer
          title: Current Spending Cents
          description: Current spending in current billing cycle (cents)
          examples:
            - 23450
        current_spending_usd:
          type: number
          title: Current Spending Usd
          description: Current spending in current billing cycle (USD)
          examples:
            - 234.5
        budget_percentage_used:
          anyOf:
            - type: number
            - type: 'null'
          title: Budget Percentage Used
          description: Percentage of budget used (null if no budget set)
          examples:
            - 46.9
            - 78.2
      type: object
      required:
        - current_spending_cents
        - current_spending_usd
      title: SpendingCapsResponse
      description: Response with spending cap configuration.
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````