CloudZero Billing API

Retrieve cost and dimension data for billing analysis.

Operations 2

POST /v2/billing/costs CloudZero Get billing costs #
GET /v2/billing/dimensions CloudZero Get billing dimensions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudzero-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudzero-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CloudZero Allocation Telemetry Billing API
  description: The CloudZero API V2 enables you to automate the collection, allocation, and analysis of your infrastructure spend. It is organized around REST with predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP methods, headers, response codes, and authentication.
  version: 2.0.0
  contact:
    name: CloudZero
    url: https://www.cloudzero.com/
  termsOfService: https://www.cloudzero.com/terms-of-service
servers:
- url: https://api.cloudzero.com
  description: CloudZero Production API
security:
- apiKey: []
tags:
- name: Billing
  description: Retrieve cost and dimension data for billing analysis.
paths:
  /v2/billing/costs:
    post:
      operationId: getBillingCosts
      summary: CloudZero Get billing costs
      description: Returns cost data according to the parameters passed in. Supports grouping by Account, Service, and other dimensions with various filters and cost types.
      tags:
      - Billing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                start:
                  type: string
                  format: date-time
                  description: Start date for the cost query.
                end:
                  type: string
                  format: date-time
                  description: End date for the cost query.
                group_by:
                  type: array
                  items:
                    type: string
                  description: Dimensions to group costs by (e.g., Account, Service, Region).
                filter:
                  type: object
                  description: Filters to apply to the cost query.
                  additionalProperties: true
                granularity:
                  type: string
                  enum:
                  - daily
                  - monthly
                  - cumulative
                  description: Time granularity for the cost data.
                cost_type:
                  type: string
                  enum:
                  - billed
                  - discounted
                  - discounted_amortized
                  - amortized
                  - invoiced_amortized
                  - real
                  - on_demand
                  description: The type of cost data to return.
              required:
              - start
              - end
      responses:
        '200':
          description: Successful response with cost data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        group:
                          type: object
                          additionalProperties:
                            type: string
                        cost:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                type: string
                                format: date-time
                              value:
                                type: number
                                format: double
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized. Invalid or missing API key.
        '403':
          description: Forbidden.
        '429':
          description: Rate limit exceeded.
  /v2/billing/dimensions:
    get:
      operationId: getBillingDimensions
      summary: CloudZero Get billing dimensions
      description: Returns a list of dimensions available for use in the getBillingCosts API and in CostFormation.
      tags:
      - Billing
      responses:
        '200':
          description: Successful response with dimension data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the dimension.
                        name:
                          type: string
                          description: Display name for the dimension.
                        type:
                          type: string
                          description: The dimension type.
        '401':
          description: Unauthorized. Invalid or missing API key.
        '403':
          description: Forbidden.
components:
  schemas:
    Pagination:
      type: object
      properties:
        next:
          type: string
          description: URL for the next page of results.
        previous:
          type: string
          description: URL for the previous page of results.
        total:
          type: integer
          description: Total number of results.
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: API key for authentication. Include your API key directly in the Authorization header.