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

# Get usage and quota

> Get current month's scoring usage, plan limits, and subscription status.




## OpenAPI

````yaml get /api/usage
openapi: 3.1.0
info:
  title: Dacard.ai API
  description: >
    Decision intelligence platform for AI-native product teams.

    Score, connect, and compound your product maturity across two original
    frameworks.
  version: 0.1.0
  contact:
    name: Darren Card
    email: darren@darrencard.com
    url: https://darrencard.com
  license:
    name: Proprietary
servers:
  - url: https://app.dacard.ai
    description: Production
  - url: http://localhost:3001
    description: Local development
security: []
tags:
  - name: Scoring
    description: AI maturity scoring engine
  - name: Lifecycle
    description: Development Lifecycle assessment
  - name: Products
    description: Product management and analytics
  - name: Dashboard
    description: Dashboard and suite analytics
  - name: Account
    description: Account and team management
  - name: Billing
    description: Stripe billing integration
  - name: User
    description: User profile, onboarding, and preferences
  - name: System
    description: Health checks and diagnostics
  - name: Internal
    description: Internal and admin endpoints (PQL tracking, demo data management)
  - name: Agents
    description: Agent Studio - autonomous AI agents, triggers, and artifacts
  - name: Intelligence
    description: Alerts, coaching context, and score timeline
  - name: Anomalies
    description: Signal anomaly detection, acknowledgment, and sensitivity overrides
  - name: Outcomes
    description: Longitudinal outcome observations for validation study (E2.2)
  - name: Settings
    description: User and account notification preferences
  - name: Webhooks
    description: Outbound webhook management
  - name: API Keys
    description: API key management (Team and Enterprise plans)
paths:
  /api/usage:
    get:
      tags:
        - User
      summary: Get usage and quota
      description: |
        Get current month's scoring usage, plan limits, and subscription status.
      operationId: getUsage
      responses:
        '200':
          description: Usage data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Usage'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - clerkAuth: []
        - bearerAuth: []
components:
  schemas:
    Usage:
      type: object
      properties:
        credits:
          type: object
          properties:
            used:
              type: number
              description: Credits used this month
            limit:
              type: number
              description: Monthly credit limit (-1 if unlimited)
            remaining:
              type: number
              description: Credits remaining (-1 if unlimited)
            breakdown:
              type: object
              properties:
                score:
                  type: number
                chat:
                  type: number
                api:
                  type: number
        resetsAt:
          type: string
          format: date-time
          description: First of next UTC month
        planId:
          type: string
          enum:
            - free
            - pro
            - team
            - enterprise
        isUnlimited:
          type: boolean
        creditCosts:
          type: object
          properties:
            score:
              type: number
            chat:
              type: number
            api:
              type: number
        subscription:
          type: object
          nullable: true
          properties:
            status:
              type: string
              enum:
                - active
                - past_due
                - canceled
                - inactive
            currentPeriodEnd:
              type: string
              format: date-time
              nullable: true
            cancelAtPeriodEnd:
              type: boolean
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error message
        code:
          type: string
          description: Error code
          enum:
            - AUTH_REQUIRED
            - FORBIDDEN
            - NOT_FOUND
            - INVALID_URL
            - CRAWL_FAILED
            - SCORE_FAILED
            - QUOTA_EXCEEDED
            - ANON_RATE_LIMIT
            - SIGNAL_RATE_LIMITED
            - SIGNAL_VALIDATION_FAILED
            - SERVER_ERROR
        message:
          type: string
          description: Human-readable message
        details:
          description: Additional context
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Authentication required
            code: AUTH_REQUIRED
  securitySchemes:
    clerkAuth:
      type: apiKey
      in: cookie
      name: __session
      description: |
        Clerk session cookie. Authentication is handled by Clerk.
        Sign in at https://app.dacard.ai/sign-in to obtain a session.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Clerk JWT session token. Obtain via Clerk's frontend SDK
        using `getToken()` or via the Clerk Backend API.

````