> ## 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

<Card title="Agent skill" icon="robot" href="https://github.com/edgesrun/linkedin-skills/blob/main/plugins/linkedin-skills/skills/edges-get-workspace-consumption/SKILL.md" horizontal>
  `edges-get-workspace-consumption` — ready-made instructions for coding agents calling this endpoint.
</Card>


## 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
                      - 'null'
                    items:
                      type: object
                      properties:
                        action_slug:
                          type: string
                        credits_used:
                          type: number
                        runs_count:
                          type:
                            - integer
                            - 'null'
                      required:
                        - action_slug
                        - credits_used
                      additionalProperties: false
                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
            - 'null'
        error_scope:
          type:
            - string
            - 'null'
          enum:
            - input
            - integ
            - param
            - config
        error_ref:
          type:
            - string
            - 'null'
          examples:
            - ERR-12345
        message:
          type: string
        status_code:
          type:
            - integer
            - 'null'
        params:
          type:
            - object
            - 'null'
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  type: string
        data:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
  securitySchemes:
    XApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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