usage

Get cost forecast for a provider

Uses historical usage data across all API keys using this provider to predict future spending. Returns average daily spend, confidence intervals, and time series forecasts.

get/admin/v1/providers/{provider}/usage/forecast

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /admin/v1/providers/{provider}/usage/forecast
  • Auth: HTTP bearer

Path parameters

providerstring required

Provider name

Query parameters

lookback_daysinteger nullable

Number of days of historical data to use (default: 30)

forecast_daysinteger nullable

Number of days to forecast ahead (default: 7)

Response

Cost forecast

avg_daily_spendnumber double required

Average daily spend (dollars) based on historical data

budget_limitnumber double nullable

Budget limit (dollars), null if no budget configured

budget_periodstring nullable

Budget period (daily or monthly)

budget_utilization_percentnumber double nullable

Percentage of budget used in current period

current_spendnumber double required

Current spend in the budget period (dollars)

days_until_exhaustionnumber double nullable

Projected days until budget exhaustion (null if no budget or zero spend rate)

days_until_exhaustion_lowernumber double nullable

Lower bound days until exhaustion (95% confidence, assumes +1 std dev spend)

days_until_exhaustion_uppernumber double nullable

Upper bound days until exhaustion (95% confidence, assumes -1 std dev spend)

projected_exhaustion_datestring nullable

Projected exhaustion date (YYYY-MM-DD, null if no budget or zero spend rate)

projected_period_spendnumber double nullable

Projected end-of-period spend at current rate (dollars)

sample_daysinteger required

Number of days of historical data used

std_dev_daily_spendnumber double required

Standard deviation of daily spend (dollars)

Changes

No recorded changes to this operation across all 16 revisions of this API.