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

# Credits remaining + reset date

> Returns the user's full credit balance, allocation, usage, and the next reset date. Each project creation costs 1,000 credits. Call this before batch operations to avoid running out mid-flow.



## OpenAPI

````yaml /api-reference/openapi.json get /api/user/credits
openapi: 3.1.0
info:
  title: Audity Agent API
  version: 1.0.0
  summary: >-
    The agent-facing surface of Audity AI: projects, leads, Nucleus, and
    account.
  description: >-
    Audity is a B2B SaaS for consultants who run automated business audits. This
    API is the agent-facing slice: a deliberately small set of task-shaped
    endpoints that lets external AI agents (Claude, ChatGPT, Cursor, n8n) act on
    a consultant's Audity workspace on their behalf.


    **Authentication:** Bearer token (`aky_...`) issued from
    `https://app.auditynow.com/dashboard/settings/api-tokens`. The middleware
    resolves the token to a Clerk user identity; tier and Row-Level Security
    gates apply automatically.


    **Rate limits:** reads 100/min, writes 20/min, async job polling 120/min;
    some expensive or high-volume endpoints have stricter caps. 429 responses
    include `Retry-After`.


    **Tier gating:** public plan names can change faster than API enum names.
    Use `GET /api/user/tier` and any `requiredTier` field in 403 responses as
    the source of truth for a specific account. Read-only or
    lead-generation-focused plans can read available data; audit-capable paid
    plans unlock writes, subject to token scope and credits.
  contact:
    name: Audity Support
    email: support@auditynow.com
    url: https://app.auditynow.com
  license:
    name: Proprietary
    identifier: LicenseRef-Audity-Proprietary
  termsOfService: https://auditynow.com/terms
servers:
  - url: https://app.auditynow.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: >-
      Audit project lifecycle, create, list, fetch, trigger analysis, get
      deliverables.
  - name: Leads
    description: ReadyLink-sourced leads, list, fetch, convert into projects.
  - name: Nucleus
    description: >-
      Nucleus is Audity's persistent memory + insight layer. Search memories,
      capture notes, read proactive insights, manage contacts.
  - name: Account
    description: Identity, tier, credits, usually called once per session for context.
  - name: ReadyLinks
    description: >-
      Manage ReadyLinks, the survey distribution links that generate leads. CRUD
      operations for links, customization, lead tracking.
  - name: Assessment Configs
    description: >-
      Manage assessment configurations that define survey questions, order,
      scoring, and customization.
  - name: Jobs
    description: >-
      Monitor async job status for long-running operations like audit analysis
      synthesis.
paths:
  /api/user/credits:
    get:
      tags:
        - Account
      summary: Credits remaining + reset date
      description: >-
        Returns the user's full credit balance, allocation, usage, and the next
        reset date. Each project creation costs 1,000 credits. Call this before
        batch operations to avoid running out mid-flow.
      operationId: getCredits
      responses:
        '200':
          description: Credit status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditStatus'
              example:
                remaining: 8500
                allocated: 10000
                used: 1500
                usagePercentage: 15
                tier:
                  id: starter
                  name: Starter
                  price: 49
                lastReset: '2026-04-01T00:00:00.000Z'
                nextReset: '2026-05-01T00:00:00.000Z'
                daysUntilReset: 0
                canCreateProject: true
                projectCreationCost: 1000
                projectsRemaining: 8
                billingProvider: paddle
                timestamp: '2026-05-03T08:30:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreditStatus:
      type: object
      properties:
        remaining:
          type: integer
        allocated:
          type: integer
        used:
          type: integer
        usagePercentage:
          type: integer
          minimum: 0
          maximum: 100
        tier:
          type: object
          properties:
            id:
              type: string
              enum:
                - solo
                - starter
                - growth
                - agency
                - team
                - professional
                - enterprise
                - scale
            name:
              type: string
            price:
              type: number
              description: Monthly price in dollars.
          required:
            - id
            - name
        lastReset:
          type: string
          format: date-time
        nextReset:
          type: string
          format: date-time
        daysUntilReset:
          type: integer
        canCreateProject:
          type: boolean
        projectCreationCost:
          type: integer
          description: Credits cost to create one new project (currently 1,000).
        projectsRemaining:
          type: integer
          description: How many new projects can be created with remaining credits.
        billingProvider:
          type: string
          enum:
            - paddle
            - stripe
        timestamp:
          type: string
          format: date-time
      required:
        - remaining
        - allocated
        - tier
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional context (development only).
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Audity Personal Access Token (aky_...)
      description: >-
        A Personal Access Token issued from
        https://app.auditynow.com/dashboard/settings/api-tokens. Format:
        `aky_<32 random chars>`.

````