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

# Get credit balance and recent transactions



## OpenAPI

````yaml /openapi.json get /api/v1/credits
openapi: 3.1.0
info:
  title: VidGuy API
  version: 1.0.0
  description: >-
    Make videos, snacks, carousels, images and audio with VidGuy, and post them
    to your connected accounts. Authenticate with a `vf_live_` key as a Bearer
    token.
servers:
  - url: https://www.vidguy.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Jobs
  - name: Credits
  - name: Brands
  - name: Snacks and memes
  - name: Videos
  - name: Carousels and slides
  - name: Images and video models
  - name: Characters
  - name: Editing
  - name: Assets
  - name: Audio
  - name: Social posting
paths:
  /api/v1/credits:
    get:
      tags:
        - Credits
      summary: Get credit balance and recent transactions
      operationId: getCredits
      parameters:
        - schema:
            type: integer
            example: 10
          required: false
          name: limit
          in: query
          description: Maximum number of recent transactions to return.
      responses:
        '200':
          description: Current balance and credit history.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreditsResponse:
      type: object
      properties:
        balance:
          type: integer
        plan:
          type:
            - object
            - 'null'
          properties:
            type:
              type: string
            creditsIncluded:
              type: integer
            creditsUsedThisPeriod:
              type: integer
            periodStart:
              type:
                - string
                - 'null'
            periodEnd:
              type:
                - string
                - 'null'
          required:
            - type
            - creditsIncluded
            - creditsUsedThisPeriod
            - periodStart
            - periodEnd
        recentTransactions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              amount:
                type: integer
              type:
                type: string
              description:
                type:
                  - string
                  - 'null'
              createdAt:
                type: string
            required:
              - id
              - amount
              - type
              - description
              - createdAt
      required:
        - balance
        - plan
        - recentTransactions
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Invalid request
        message:
          type: string
        details:
          type: object
          additionalProperties: {}
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Send your API key in the Authorization header: `Bearer vf_live_...`'

````

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