Skip to main content

Cloud Billing API

The Temporal Cloud Billing API provides Namespace-level cost attribution through on-demand billing reports. These reports are generated asynchronously and can be accessed with an object endpoint or downloaded in CSV format for analysis by FinOps professionals and Temporal Cloud operators.

This API is part of the Cloud Operations API.

Support, stability, and dependency info

The Temporal Cloud Billing API is in Pre-release.

The Billing API allows you to:

  • Generate billing reports for specified invoice months
  • Retrieve report status and metadata
  • Correlate report generation with async operations
  • Download CSV reports
  • Integrate billing reports into internal analytics tooling and cloud cost management platforms

The Billing API contains:

  • Accurate Namespace-level cost attribution
  • Down to hourly granularity
  • Alignment with the FOCUS schema

For complete request and response schemas, refer to the Protocol Buffer definitions below.

Billing report generation is asynchronous. You initiate report creation, then poll for completion.

Report data granularity

Reports can be generated with hourly granularity only, for the current billing month, and the previous billing month.

Allowed date ranges

Date ranges must use billing-month boundaries (MM/YYYY). Requests may include the current billing month. The data in finalized reports includes usage up to current\_time - 24 hours (rounded up to nearest hour).

Limitiations

Data from the current billing period is not cacheable. Also, recently requested historical date ranges may complete faster due to caching.

Rate limits and concurrency

To ensure system stability, rate limits apply to API usage.

Per-account concurrency

Within a single account:

  • Only one billing report per account is processed at a time
  • Additional requests are accepted but queued
  • Processing occurs serially per account

Global rate limits

Billing report generation depends on shared infrastructure.

Report generation time varies based on:

  • Global system load
  • Date range size
  • Cache availability

Caching behavior

If a previously requested date range is requested again:

  • Cached precomputed data is reused
  • Global rate limits are skipped
  • Generation completes significantly faster

Exception: Data from the current billing period is not cached.

Best practices

Provide an idempotency key (async_operation_id) when retrying requests.

Poll GetBillingReport using exponential backoff.

Download reports immediately after generation (URLs expire).

Reuse previously requested date ranges when possible to benefit from caching.

Avoid frequent generation of large overlapping ranges in the current billing period.

Billing report schema

Billing reports are delivered in CSV format.

Each row represents a charge record.

Column NameDescriptionExample
BillingAccountIDTemporal Cloud account IDa2dd6
BillingAccountNameTemporal Cloud account nametemporal
BillingCurrencyThe currency an account is billed inUSD (cents)
BillingPeriodEndThe exclusive end bound of a billing period2024-02-01T00:00:00Z
BillingPeriodStartThe inclusive start bound of a billing period2024-01-01T00:00:00Z
ChargeCategoryThe highest level classification of a charge based on how it is billedUsage
ChargeDescriptionA self contained summary of the charge’s purposeActions - Tier 1
ChargeFrequencyIndicates how often a charge will occurUsage-Based
ChargePeriodEndTime period end from when this charge took place, correlates to data granularity2025-10-01T01:00:00.000Z
ChargePeriodStartTime period start from when this charge took place, correlates to data granularity2025-10-01T00:00:00.000Z
ContractedCostCost calculated by multiplying ContractedUnitPrice and PricingQuantity100.00
ContractedUnitPriceThe agreed-upon unit price for a single pricing unit of the associated SKU. Inclusive of negotiated discounts10.00
InvoiceIDThe ID of the invoice for this billing periodin_1SPN94JLJETBw2gmYWyQ71xT
InvoiceIssuerThe entity responsible for issuing payable invoicesstripe
PricingQuantityThe volume of a given SKU used or purchased10.00
PricingUnitThe measurement unit used for PricingQuantity1 Million Actions
ProviderThe provider of purchased resources or servicesTemporal Technologies
PublisherThe publisher of purchased resources or servicesTemporal Technologies
ResourceIDNamespace name + Temporal Cloud account IDproduction.a2dd6
ResourceNameNamespace name + Temporal Cloud account IDproduction.a2dd6
ResourceTypeThe type of resource the charge applies toNamespace
ServiceCategoryThe highest level classification of a service based on the core function of the serviceTemporal Cloud
ServiceNameAn offering that can be purchased from a providerTemporal Cloud
ServiceSubcategoryA secondary classification of the service category for a service based on its core functionActions
SKUIDA unique identifier that represents a specific SKUessentials-actions
SKUMeterThe functionality being metered or measured by a particular SKU in a chargeActions
TagsProvider and customer defined tags associated with resources{"$tmprl\_project":\["project-id"\],"namespace-tag-key":\["namespace-tag-value"\]}

Generate a report

To generate a report, follow these steps:

  1. Create a billing report using CreateBillingReport
  2. Receive:
    • billing_report_id (identifies the report artifact)
    • async_operation_id (identifies the background job)
  3. Poll GetBillingReport using the billing_report_id
  4. When the report state becomes BILLING_REPORT_STATE_GENERATED, retrieve the download URL
  5. Download the report before the URL expires

Key identifiers

IdentifierPurpose
billing_report_idIdentifies the billing report artifact and is used to retrieve metadata and download URLs
async_operation_idIdentifies the background operation responsible for generating the report

The async operation follows the standard Cloud Operations async model (see Async Operations.