---
title: "CostAndUsage"
---

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

Path: Billing API

## Fields

- `CostAndUsage.organizationId` (string, required)
- `CostAndUsage.from` (string, required)
  - format `date-time`
- `CostAndUsage.to` (string, required)
  - format `date-time`
- `CostAndUsage.granularity` (string, required) — hour, day or month.
- `CostAndUsage.currency` (string, required)
- `CostAndUsage.ratedThrough` (string, required) — Every hour before this is rated; later costs are still coming.
  - format `date-time`
- `CostAndUsage.periods` (array<object>, required) — Every period in the window.
  - `CostAndUsage.periods.start` (string, required)
    - format `date-time`
  - `CostAndUsage.periods.end` (string, required) — Exclusive.
    - format `date-time`
  - `CostAndUsage.periods.estimated` (boolean, required)
  - `CostAndUsage.periods.groups` (array<object>, required)
    - `CostAndUsage.periods.groups.keys` (map<string>, required) — The group's values of the groupBy keys. project "" is organization-level usage.
    - `CostAndUsage.periods.groups.billedCost` (string, required) — Micros.
      - pattern `^-?[0-9]+(\.[0-9]+)?$`
    - `CostAndUsage.periods.groups.quantity` (string | null, required) — Set when grouped by meter or sku.
    - `CostAndUsage.periods.groups.unit` (string | null, required) — The quantity's unit; null for charges without a meter.
- `CostAndUsage.values` (map<array<string>>, required) — Every value of each key in the window, whatever the filter.
- `CostAndUsage.labels` (object, required) — Display names for the IDs in the answer. IDs without one are left out.
  - `CostAndUsage.labels.services` (map<string>, required)
  - `CostAndUsage.labels.meters` (map<string>, required)
  - `CostAndUsage.labels.skus` (map<string>, required)
- `CostAndUsage.nextCursor` (null, required) — One page: always null.


Source: https://docs.ezghcloud.com/billing-api/schemas/CostAndUsage/index.md
