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

# Check API Credits

> Returns the current API credit balance for the authenticated user.



## OpenAPI

````yaml GET /v1/credits
openapi: 3.1.0
info:
  title: Loova API
  description: Loova API lets developers generate AI images and videos programmatically.
  version: 1.0.0
servers:
  - url: https://api.loova.ai/api
security:
  - bearerAuth: []
paths:
  /v1/credits:
    get:
      summary: Check API Credits
      description: Returns the current API credit balance for the authenticated user.
      operationId: checkApiCredits
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
              example:
                code: 200
                trace_id: 45c30d76f06549b199a3775544515689
                message: null
                data:
                  api_available_credits: 47995
                  api_total_credits: 51000
        '400':
          description: Request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 400
                trace_id: 45c30d76f06549b199a3775544515689
                message: Detailed error message
                data: null
      security:
        - bearerAuth: []
components:
  schemas:
    CreditsResponse:
      type: object
      properties:
        code:
          type: integer
        trace_id:
          type: string
        message:
          type:
            - string
            - 'null'
        data:
          type: object
          properties:
            api_available_credits:
              type: number
            api_total_credits:
              type: number
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        trace_id:
          type: string
        message:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````