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

# Get credits usage

> Get current credit usage for the authenticated user



## OpenAPI

````yaml https://vortexpdf.com/openapi get /api/v1/credits
openapi: 3.0.0
info:
  title: Vortex PDF
  version: '1.0'
servers:
  - url: https://vortexpdf.com
    variables: {}
security: []
tags: []
paths:
  /api/v1/credits:
    get:
      tags:
        - Credits
      summary: Get credits usage
      description: Get current credit usage for the authenticated user
      operationId: VortexWeb.API.V1.CreditsController.show
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credits_usage_response'
          description: Credits usage response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_error_response'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_error_response'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
          description: Error response
      callbacks: {}
      security:
        - authorization: []
components:
  schemas:
    credits_usage_response:
      description: Current credits usage information
      properties:
        data:
          properties:
            credits_total:
              description: Total credits available in the plan
              type: integer
            credits_used:
              description: Credits used in the current billing period
              type: number
            period_end:
              description: End date of the current billing period
              format: date-time
              nullable: true
              type: string
            period_start:
              description: Start date of the current billing period
              format: date-time
              nullable: true
              type: string
            plan_name:
              description: Name of the user's current plan
              type: string
            usage_details:
              description: Detailed breakdown of credits usage
              items:
                $ref: '#/components/schemas/usage_detail'
              type: array
          required:
            - plan_name
            - credits_total
            - credits_used
            - usage_details
          type: object
      required:
        - data
      title: credits_usage_response
      type: object
    auth_error_response:
      description: Response when authentication or authorization fails
      example:
        error: unauthorized
        message: Authentication required to access this resource
      properties:
        error:
          description: Error message describing the authentication or authorization failure
          enum:
            - unauthorized
            - forbidden
            - invalid_token
            - expired_token
            - insufficient_permissions
          type: string
        message:
          description: A more detailed message explaining the error
          type: string
      required:
        - error
      title: auth_error_response
      type: object
    error_response:
      description: Response when an error occurs
      properties:
        error:
          properties:
            message:
              description: Error message
              type: string
          required:
            - message
          type: object
      required:
        - error
      title: error_response
      type: object
    usage_detail:
      description: Details of credits usage for a specific time period
      properties:
        aggregated_value:
          description: Number of credits used
          type: number
        end_time:
          description: The end time of the usage period
          format: date-time
          type: string
        id:
          description: The ID of the usage record
          type: string
        livemode:
          description: Whether this is a live meter or test
          type: boolean
        meter:
          description: The meter identifier
          type: string
        start_time:
          description: The start time of the usage period
          format: date-time
          type: string
      required:
        - id
        - aggregated_value
        - start_time
        - end_time
        - meter
      title: usage_detail
      type: object
  securitySchemes:
    authorization:
      description: Manage your API keys at https://vortexpdf.com/api-keys
      scheme: bearer
      type: http

````