> ## 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 Current Usage

> Get current month usage.

Returns credit consumption for the current billing period,
estimated cost, and next invoice date.

**Requirements:**
- Read permission

**Example:**
```python
response = await client.get("/v1/organizations/billing/usage/current")
print(f"Usage: {response['current_month_usage']} credits")
print(f"Estimated cost: ${response['estimated_cost_usd']}")
```



## OpenAPI

````yaml get /v1/organizations/billing/usage/current
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/usage/current:
    get:
      tags:
        - Organization Billing
      summary: Get Current Usage
      description: |-
        Get current month usage.

        Returns credit consumption for the current billing period,
        estimated cost, and next invoice date.

        **Requirements:**
        - Read permission

        **Example:**
        ```python
        response = await client.get("/v1/organizations/billing/usage/current")
        print(f"Usage: {response['current_month_usage']} credits")
        print(f"Estimated cost: ${response['estimated_cost_usd']}")
        ```
      operationId: get_current_usage_v1_organizations_billing_usage_current_get
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentUsageResponse'
        '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:
    CurrentUsageResponse:
      properties:
        current_month_usage:
          type: integer
          title: Current Month Usage
          description: Credits consumed in current billing cycle
          examples:
            - 23450
        billing_month:
          type: string
          title: Billing Month
          description: Current billing month (YYYY-MM)
          examples:
            - 2025-12
        billing_period_start:
          type: string
          format: date-time
          title: Billing Period Start
          description: Start of current billing period
        billing_period_end:
          type: string
          format: date-time
          title: Billing Period End
          description: End of current billing period
        estimated_cost_usd:
          type: number
          title: Estimated Cost Usd
          description: Estimated cost for current usage
          examples:
            - 23.45
        credit_rate:
          type: number
          title: Credit Rate
          description: Cost per credit in USD
          default: 0.001
        auto_billing_enabled:
          type: boolean
          title: Auto Billing Enabled
          description: Whether auto-billing is enabled
        next_invoice_date:
          type: string
          format: date-time
          title: Next Invoice Date
          description: When next invoice will be generated
        plan_usage:
          anyOf:
            - $ref: '#/components/schemas/PlanUsage'
            - type: 'null'
          description: >-
            Tier usage vs caps (objects for managed, vectors for MVS). None only
            if plan resolution fails.
        usage_v2:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage V2
          description: >-
            Modality+features usage for the period (contract v2 §2): dollars by
            modality and feature, unit counts, estimated flag. SHADOW data until
            cutover — informational alongside the credit fields above. None if
            no v2 records exist yet or aggregation fails (best-effort).
      type: object
      required:
        - current_month_usage
        - billing_month
        - billing_period_start
        - billing_period_end
        - estimated_cost_usd
        - auto_billing_enabled
        - next_invoice_date
      title: CurrentUsageResponse
      description: Response with current month usage.
    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
    PlanUsage:
      properties:
        product:
          type: string
          title: Product
          examples:
            - managed
        tier:
          type: string
          title: Tier
          examples:
            - build
        plan_name:
          type: string
          title: Plan Name
          examples:
            - Build
        monthly_minimum_cents:
          type: integer
          title: Monthly Minimum Cents
          examples:
            - 2500
        period_start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Period Start
        period_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Period End
        objects_processed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Objects Processed
          examples:
            - 41230
        object_cap:
          anyOf:
            - type: integer
            - type: 'null'
          title: Object Cap
          examples:
            - 100000
        vectors_stored:
          anyOf:
            - type: integer
            - type: 'null'
          title: Vectors Stored
        vector_cap:
          anyOf:
            - type: integer
            - type: 'null'
          title: Vector Cap
        usage_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Usage Pct
          description: Percent of the relevant cap consumed.
          examples:
            - 41.2
        cap_state:
          type: string
          title: Cap State
          default: ok
          examples:
            - ok
            - warning
            - exceeded
      type: object
      required:
        - product
        - tier
        - plan_name
        - monthly_minimum_cents
      title: PlanUsage
      description: |-
        Tier usage vs caps (2026-07 overhaul) — powers the billing page's
        usage bar and the 80% upgrade CTA. Managed plans report objects; MVS
        plans report vectors; the irrelevant pair is null. cap_state: ok |
        warning (>=80%) | exceeded (>=100%; further ingest is rejected with
        type=QuotaExceededError — reads keep working).
    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

````