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

# Get daily cost breakdown (pay-as-you-go only)

> Get daily costs for a given period, summed down to one dimension: region (default),
project, resource type or flavor. Requested period should not exceed 31 days.
Costs and usages are returned at full precision.

The response can have more than one row for one day and one `group_by` value (for example, one region
on one day). Usage with a different unit (`usage.unit`, for example `minutes` or `bytes`) is in a
different row. Usage without a price (`error` is not null) is also in a different row.

Note: This report assumes there are no active commit features in the billing plan.
If there are active commit features (pre-paid resources) in your plan, use /v1/`reservation_cost_report`/totals,
as the results from this report will not be accurate.

Data from the past hour may not reflect the full set of statistics.
For the most complete and accurate results, we recommend accessing the data at least one hour after the
relevant time period. Updates are generally available within a 24-hour window, though timing can vary.
Scheduled maintenance or other exceptions may occasionally cause delays beyond 24 hours.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/cloud_api.yaml post /cloud/v2/cost_report/breakdown
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: a7867aecc91c
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
  - name: Container as a Service
  - name: Cost Reports
  - name: DDoS Protection
  - name: Everywhere Inference
  - name: Everywhere Inference Apps
  - name: File Shares
  - name: Floating IPs
  - name: Function as a Service
  - name: GPU Bare Metal
  - name: GPU Virtual
  - name: IP Ranges
  - name: Images
  - name: Instances
  - name: Load Balancers
  - name: Logging
  - name: Managed Kubernetes
  - name: Managed PostgreSQL
  - name: Networks
  - name: Placement Groups
  - name: Ports
  - name: Pricing
  - name: Projects
  - name: Quotas
  - name: Regions
  - name: Registry
  - name: Reservations
  - name: Reserved IPs
  - name: Routers
  - name: SSH Keys
  - name: Secrets
  - name: Security Groups
  - name: Snapshot Schedules
  - name: Snapshots
  - name: Tasks
  - name: User Actions
  - name: User Role Assignments
  - name: Volumes
paths:
  /cloud/v2/cost_report/breakdown:
    post:
      tags:
        - Cost Reports
      summary: Get daily cost breakdown (pay-as-you-go only)
      description: >-
        Get daily costs for a given period, summed down to one dimension: region
        (default),

        project, resource type or flavor. Requested period should not exceed 31
        days.

        Costs and usages are returned at full precision.


        The response can have more than one row for one day and one `group_by`
        value (for example, one region

        on one day). Usage with a different unit (`usage.unit`, for example
        `minutes` or `bytes`) is in a

        different row. Usage without a price (`error` is not null) is also in a
        different row.


        Note: This report assumes there are no active commit features in the
        billing plan.

        If there are active commit features (pre-paid resources) in your plan,
        use /v1/`reservation_cost_report`/totals,

        as the results from this report will not be accurate.


        Data from the past hour may not reflect the full set of statistics.

        For the most complete and accurate results, we recommend accessing the
        data at least one hour after the

        relevant time period. Updates are generally available within a 24-hour
        window, though timing can vary.

        Scheduled maintenance or other exceptions may occasionally cause delays
        beyond 24 hours.
      operationId: CostReportBreakdownHandler.post
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostReportBreakdownRequestSerializer'
      responses:
        '200':
          description: Daily cost breakdown
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostReportBreakdownResponseSerializer'
components:
  schemas:
    CostReportBreakdownRequestSerializer:
      additionalProperties: false
      properties:
        enable_last_day:
          default: false
          description: >-
            Expenses for the last specified day are taken into account. As the
            default, False.
          example: false
          examples:
            - false
          title: Enable Last Day
          type: boolean
        group_by:
          $ref: '#/components/schemas/CostReportBreakdownGroupBy'
          default: region
          description: >-
            Dimension the daily rows are summed down to. Only one grouping per
            request.
          examples:
            - region
        project_ids:
          description: List of project IDs. Omit for all accessible projects.
          example:
            - 16
            - 17
            - 18
            - 19
            - 20
          examples:
            - - 16
              - 17
              - 18
              - 19
              - 20
          items:
            type: integer
          minItems: 1
          title: Project Ids
          type: array
        region_ids:
          description: >-
            List of region IDs. Omit for all regions and global usage; an empty
            list is rejected. Use 0 for global usage that has no region.
          example:
            - 0
            - 76
          examples:
            - - 0
              - 76
          items:
            type: integer
          minItems: 1
          title: Region Ids
          type: array
        response_format:
          $ref: '#/components/schemas/CostReportResourcesResponseFormat'
          default: json
          description: 'Format of the response: json (default) or `csv_records`.'
          examples:
            - csv_records
            - json
        tags:
          $ref: '#/components/schemas/TagsFilterSerializer'
          description: Filter by tags
          examples:
            - condition_type: OR
              conditions:
                - key: os_version
                  strict: true
                  value: '22.04'
                - key: os_version
                  strict: true
                  value: '23.04'
        time_from:
          description: >-
            The start date of the report period (ISO 8601). The report starts
            from the beginning of this day in UTC.
          example: '2023-01-01T00:00:00Z'
          examples:
            - '2023-01-01T00:00:00Z'
          format: date-time
          title: Time From
          type: string
        time_to:
          description: >-
            The end date of the report period (ISO 8601). The report ends just
            before the beginning of this day in UTC.
          example: '2023-02-01T00:00:00Z'
          examples:
            - '2023-02-01T00:00:00Z'
          format: date-time
          title: Time To
          type: string
        types:
          description: List of resource types. Omit for all types.
          example:
            - egress_traffic
            - instance
          examples:
            - - egress_traffic
              - instance
          items:
            $ref: '#/components/schemas/PrebillingResourceTypes'
          minItems: 1
          title: Types
          type: array
      required:
        - time_from
        - time_to
      title: CostReportBreakdownRequestSerializer
      type: object
    CostReportBreakdownResponseSerializer:
      properties:
        count:
          description: Count of returned rows
          example: 7
          examples:
            - 7
          minimum: 0
          title: Count
          type: integer
        price_status:
          $ref: '#/components/schemas/CostReportPriceDisplayStatus'
          description: >-
            'show' when the client may see prices, 'hide' for trial clients,
            clients with no product status, and clients of a reseller that does
            not expose prices. This report never returns 'error'.
        results:
          items:
            $ref: '#/components/schemas/CostReportBreakdownResultSerializer'
          title: Results
          type: array
      required:
        - count
        - results
        - price_status
      title: CostReportBreakdownResponseSerializer
      type: object
    CostReportBreakdownGroupBy:
      description: >-
        Dimension the breakdown rows are summed down to, on top of the
        always-present date.
      enum:
        - flavor
        - project
        - region
        - type
      title: CostReportBreakdownGroupBy
      type: string
    CostReportResourcesResponseFormat:
      enum:
        - csv_records
        - json
      title: CostReportResourcesResponseFormat
      type: string
    TagsFilterSerializer:
      description: Represents a filter consisting of multiple tag filtering conditions.
      properties:
        condition_type:
          $ref: '#/components/schemas/TagsFilterConditionTypes'
          default: OR
          description: >-
            Specifies whether conditions are combined using OR (default) or AND
            logic.
        conditions:
          description: A list of tag filtering conditions defining how tags should match.
          example:
            - key: os_version
              strict: true
              value: '9'
            - key: os_type
              strict: true
              value: linux
            - key: os_distro
              strict: true
              value: centos
          examples:
            - - key: os_version
                strict: true
                value: '9'
              - key: os_type
                strict: true
                value: linux
              - key: os_distro
                strict: true
                value: centos
          items:
            $ref: '#/components/schemas/TagsFilterConditionSerializer'
          maxItems: 10
          minItems: 1
          title: Conditions
          type: array
      required:
        - conditions
      title: TagsFilterSerializer
      type: object
    PrebillingResourceTypes:
      description: Resource types for prebilling report
      enum:
        - ai_cluster
        - ai_virtual_cluster
        - backup
        - baremetal
        - basic_vm
        - containers
        - dbaas_postgresql_connection_pooler
        - dbaas_postgresql_cpu
        - dbaas_postgresql_memory
        - dbaas_postgresql_public_network
        - dbaas_postgresql_volume
        - egress_traffic
        - external_ip
        - file_share
        - floatingip
        - functions
        - functions_calls
        - functions_traffic
        - image
        - inference
        - inference_public_models
        - instance
        - load_balancer
        - log_index
        - snapshot
        - volume
      title: PrebillingResourceTypes
      type: string
    CostReportPriceDisplayStatus:
      enum:
        - error
        - hide
        - show
      title: CostReportPriceDisplayStatus
      type: string
    CostReportBreakdownResultSerializer:
      description: One day of usage for one `group_by` value.
      properties:
        date:
          description: Day the usage was billed for
          example: '2026-07-17'
          examples:
            - '2026-07-17'
          format: date
          title: Date
          type: string
        error:
          anyOf:
            - $ref: '#/components/schemas/CostReportCostError'
            - type: 'null'
          description: Why the cost is missing, set only when cost is null
          examples:
            - null
        flavor:
          anyOf:
            - type: string
            - type: 'null'
          description: Flavor name, set when `group_by` is 'flavor'
          examples:
            - bm2-infrastructure-medium
          title: Flavor
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: Project ID, set when `group_by` is 'project'
          examples:
            - 101
          title: Project Id
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Region ID, set when `group_by` is 'region'. 0 means global usage
            that has no region.
          examples:
            - 76
          title: Region Id
        type:
          anyOf:
            - $ref: '#/components/schemas/PrebillingResourceTypes'
            - type: 'null'
          description: Resource type, set when `group_by` is 'type' or 'flavor'
          examples:
            - baremetal
        usage:
          $ref: '#/components/schemas/CostReportBreakdownUsageSerializer'
      required:
        - date
        - type
        - flavor
        - region_id
        - project_id
        - usage
        - error
      title: CostReportBreakdownResultSerializer
      type: object
    TagsFilterConditionTypes:
      enum:
        - AND
        - OR
      title: TagsFilterConditionTypes
      type: string
    TagsFilterConditionSerializer:
      additionalProperties: false
      properties:
        key:
          description: The name of the tag to filter (e.g., 'os_version').
          example: os_version
          examples:
            - os_version
          maxLength: 128
          minLength: 3
          title: Key
          type: string
        strict:
          description: >-
            Determines how strictly the tag value must match the specified
            value. If true, the tag value must exactly match the given value. If
            false, a less strict match (e.g., partial or case-insensitive match)
            may be applied.
          example: true
          examples:
            - true
          title: Strict
          type: boolean
        value:
          description: The value of the tag to filter (e.g., '22.04').
          example: '22.04'
          examples:
            - '22.04'
          maxLength: 256
          minLength: 3
          title: Value
          type: string
      title: TagsFilterConditionSerializer
      type: object
    CostReportCostError:
      description: >-
        Why a row has no cost. Values are the plain strings v1 has always
        returned.
      enum:
        - Multiple subscriptions
        - No tariff
      title: CostReportCostError
      type: string
    CostReportBreakdownUsageSerializer:
      description: How much the group was used that day, and what that costs.
      properties:
        cost:
          anyOf:
            - type: number
            - type: 'null'
          description: Cost for the day, never rounded. Null if there is no price.
          examples:
            - 163.190753
          title: Cost
        currency:
          anyOf:
            - type: string
            - type: 'null'
          description: Currency of the cost, null if there is no cost
          examples:
            - EUR
          title: Currency
        unit:
          description: Unit of the billing value
          example: minutes
          examples:
            - minutes
          title: Unit
          type: string
        value:
          description: >-
            Usage of the billing metric for the day, in `unit`, kept at full
            precision.
          example: 6688
          examples:
            - 6688
          title: Value
          type: number
      required:
        - value
        - unit
        - cost
        - currency
      title: CostReportBreakdownUsageSerializer
      type: object
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234_abcdef`
      type: apiKey
      in: header
      name: Authorization

````