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

# Get credit balance

> Return the spendable credit balance for your workspace, the next expiry date, and a per-grant breakdown. Credits are consumed by TTS (1 credit per character) and future products.



## OpenAPI

````yaml GET /v1/credits
openapi: 3.1.0
info:
  title: Chariot AI API
  version: '1'
  description: >-
    Chariot AI is a text-to-speech (TTS) platform built for Indian and English
    voices. Convert text into natural-sounding speech over a simple REST call,
    an HTTP audio stream, or a low-latency WebSocket. This reference documents
    the public, API-key-authenticated endpoints. Speech-to-text (ASR) is coming
    soon.
  contact:
    name: Chariot AI Support
    email: support@chariot.in
    url: https://chariot.in
servers:
  - url: https://api.chariot.in
    description: Production
  - url: https://dev-api.chariot.in
    description: Development / sandbox
security:
  - APIKeyHeader: []
tags:
  - name: Text to Speech
    description: Convert text into speech synchronously or as a stream.
  - name: Voices
    description: List the voice catalog and manage your cloned (custom) voices.
  - name: Account
    description: Inspect your credit balance and usage.
paths:
  /v1/credits:
    get:
      tags:
        - Account
      summary: Get credit balance
      description: >-
        Return the spendable credit balance for your workspace, the next expiry
        date, and a per-grant breakdown. Credits are consumed by TTS (1 credit
        per character) and future products.
      operationId: getCreditBalance
      responses:
        '200':
          description: The current credit balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditBalance'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreditBalance:
      type: object
      properties:
        available_credits:
          type: integer
          description: Total spendable credits across all active grants.
          example: 500000
        next_expiry_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the soonest-expiring grant lapses.
        grants:
          type: array
          items:
            $ref: '#/components/schemas/CreditGrantSummary'
    CreditGrantSummary:
      type: object
      properties:
        grant_id:
          type: string
          format: uuid
        source:
          type: string
          description: Where the credits came from.
          enum:
            - subscription_cycle
            - promo
            - admin_adjustment
            - topup
        amount_initial:
          type: integer
        amount_remaining:
          type: integer
        granted_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
    Error:
      type: object
      description: Standard error envelope returned by all endpoints.
      properties:
        statusCode:
          type: integer
          description: HTTP status code, echoed in the body.
        error:
          type: string
          description: Machine-readable error class name.
        message:
          type: string
          description: Human-readable description of what went wrong.
      required:
        - statusCode
        - error
        - message
  responses:
    Unauthorized:
      description: >-
        Authentication failed — the API key is missing, invalid, expired, or the
        request origin is not allowed for this key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No credentials provided
              value:
                statusCode: 401
                error: UnauthorizedException
                message: No API key or user credentials provided
            invalid:
              summary: Invalid or unknown API key
              value:
                statusCode: 401
                error: UnauthorizedException
                message: Invalid API Key or user credentials
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: chariotai-api-key
      description: >-
        Your Chariot AI API key, generated from the dashboard. Send it in the
        `chariotai-api-key` header on every request.

````