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

# Get usage summary



## OpenAPI

````yaml /dcs-openapi.json get /v1/usage
openapi: 3.1.0
info:
  description: Controlplane API for Dedalus Cloud Services (DCS).
  title: Dedalus Cloud Services API
  version: v1
servers:
  - description: Official DCS API
    url: https://dcs.dedaluslabs.ai
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/usage:
    get:
      tags:
        - Usage
        - Machine Lifecycle
      summary: Get usage summary
      operationId: getUsage
      parameters:
        - description: >-
            Billing period start (YYYY-MM-DD). Defaults to first of current
            month.
          explode: false
          in: query
          name: period_start
          schema:
            description: >-
              Billing period start (YYYY-MM-DD). Defaults to first of current
              month.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageBody'
          description: OK
        '400':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Invalid request
        '401':
          content:
            application/json:
              examples:
                invalid_key:
                  value:
                    error_code: AUTH_INVALID
                    message: invalid Dedalus API key
                    retryable: false
                missing_key:
                  value:
                    error_code: AUTH_REQUIRED
                    message: missing Dedalus API key
                    retryable: false
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Authentication required
        '403':
          content:
            application/json:
              examples:
                org_mismatch:
                  value:
                    error_code: AUTH_ORG_MISMATCH
                    message: org scope does not match API key ownership
                    retryable: false
                scope_forbidden:
                  value:
                    error_code: AUTH_SCOPE_FORBIDDEN
                    message: internal service authorization is required
                    retryable: false
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Internal server error
        '502':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Billing ledger unavailable
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
components:
  schemas:
    UsageBody:
      additionalProperties: false
      properties:
        billed_awake_seconds:
          description: Closed awake seconds in billed org buckets for the period.
          format: int64
          type: integer
        billed_cpu_millicore_seconds:
          description: >-
            Closed requested vCPU millicores multiplied by guest-owned active
            CPU seconds for the period.
          format: int64
          type: integer
        billed_logical_storage_mib_seconds:
          description: >-
            Closed billable logical MiB-seconds for the period, matching the
            Stripe storage meter.
          format: int64
          type: integer
        billed_memory_mib_seconds:
          description: >-
            Closed requested memory MiB multiplied by running allocation seconds
            for the period.
          format: int64
          type: integer
        included_storage_gib:
          description: Plan-included storage in GiB, used as a local guardrail only.
          format: int64
          type: integer
        plan_slug:
          description: Billing plan in effect for the organization.
          type: string
        provisioned_storage_gib:
          description: Current provisioned storage summed across machines in GiB.
          format: int64
          type: integer
      required:
        - plan_slug
        - billed_awake_seconds
        - billed_cpu_millicore_seconds
        - billed_memory_mib_seconds
        - provisioned_storage_gib
        - included_storage_gib
        - billed_logical_storage_mib_seconds
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Dedalus API key. Alternative to Bearer token.
      in: header
      name: x-api-key
      type: apiKey
    BearerAuth:
      bearerFormat: Dedalus API key
      description: 'Dedalus API key in Authorization: Bearer <key>.'
      scheme: bearer
      type: http

````