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

# Credit Consumption

> Retrieve credit usage for the current billing period



## OpenAPI

````yaml v1/api/actions.json get /workspaces/consumption
openapi: 3.1.0
info:
  title: ED Automation External API
  description: This is the External API documentation for ED Automation
  version: dev
servers:
  - url: https://api.edges.run/v1
security:
  - XApiKeyAuth: []
paths:
  /workspaces/consumption:
    get:
      tags:
        - public / workspaces
      summary: Get current workspace stats
      operationId: getWorkspaceConsumption
      responses:
        '200':
          description: Consumed credits
          content:
            application/json:
              schema:
                description: Consumed credits
                type: object
                properties:
                  credits_left:
                    type: number
                  credits_used:
                    type: number
                  credits_max:
                    type: number
                  current_month_start:
                    type: string
                    format: date-time
                  current_month_end:
                    type: string
                    format: date-time
                  consumptions:
                    type: array
                    items:
                      type: object
                      properties:
                        action_slug:
                          type: string
                        credits_used:
                          type: number
                        runs_count:
                          type: integer
                          nullable: true
                      required:
                        - action_slug
                        - credits_used
                      additionalProperties: false
                    nullable: true
                additionalProperties: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
components:
  schemas:
    def-0:
      title: APIError
      description: >-
        Represents an error returned by the API. This schema defines the
        standard structure of error messages to ensure consistent error handling
        across the application.
      type: object
      properties:
        error_label:
          type: string
          nullable: true
        error_scope:
          type: string
          enum:
            - input
            - integ
            - param
            - config
          nullable: true
        error_ref:
          type: string
          nullable: true
          example: ERR-12345
        message:
          type: string
        status_code:
          type: integer
          nullable: true
        params:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  type: string
          nullable: true
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
  securitySchemes:
    XApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````