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

# Get credits



## OpenAPI

````yaml GET /v1/credits
openapi: 3.1.0
info:
  title: Antara API
  version: 1.0.0
  description: OpenAI- and Anthropic-compatible inference plus organization management.
servers:
  - url: https://api.antarah.dev
security: []
paths:
  /v1/credits:
    get:
      summary: >-
        Lifetime credits granted and used by the organization, in USD (may lag ≤
        5 s)
      responses:
        '200':
          description: OK
          headers:
            x-request-id:
              schema:
                type: string
                description: Request ID (`req_…`); also sent as `request-id`
              required: false
              description: Request ID (`req_…`); also sent as `request-id`
            ratelimit-policy:
              schema:
                type: string
                description: e.g. `"rpm";q=60;w=60` (02 §8)
              required: false
              description: e.g. `"rpm";q=60;w=60` (02 §8)
            ratelimit:
              schema:
                type: string
                description: Scope closest to exhaustion, e.g. `"rpm";r=59;t=42`
              required: false
              description: Scope closest to exhaustion, e.g. `"rpm";r=59;t=42`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credits'
        '503':
          description: '`credit_balance_unavailable`'
          headers:
            retry-after:
              schema:
                type: string
                description: Seconds (`2`)
              required: false
              description: Seconds (`2`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
        default:
          description: OpenAI-shaped error (02 §4.1)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
      security:
        - projectKey: []
        - session: []
components:
  schemas:
    Credits:
      type: object
      properties:
        data:
          type: object
          properties:
            total_credits:
              type: number
              example: 25
            total_usage:
              type: number
              example: 3.4172
          required:
            - total_credits
            - total_usage
      required:
        - data
    OpenAIError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              example: invalid_request_error
            param:
              type:
                - string
                - 'null'
            code:
              type: string
              example: invalid_api_key
            request_id:
              type: string
          required:
            - message
            - type
            - param
            - code
            - request_id
      required:
        - error
  securitySchemes:
    projectKey:
      type: http
      scheme: bearer
      description: '`ak_…` project API key (or `x-api-key`)'
    session:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Supabase access token + `Antara-Organization` (management) or
        `Antara-Project` (inference)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.