Skip to main content

FinOps Costs

Cost tracking, attribution, and time-series queries for AI workloads, including realtime Kubecost data, historical breakdowns, trends, forecasts, anomalies, savings recommendations, and dashboard rollups.

All endpoints require authentication via X-API-Key header and the appropriate scope.


Cost Point Object

{
"date": "2025-02-01T00:00:00Z",
"total": 1234.56
}

GET /api/v1/finops/costs/monthly

Get monthly cost breakdown.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
monthsintegerNoNumber of months to retrieve (default: 12)
yearintegerNoYear to filter costs for

Response 200 OK

{
"months": [
{ "date": "2025-01-01T00:00:00Z", "total": 8123.45 }
],
"summary": {
"average_monthly": 8123.45,
"highest_month": { "date": "2025-01-01T00:00:00Z", "total": 8123.45 },
"lowest_month": { "date": "2025-01-01T00:00:00Z", "total": 8123.45 }
}
}

GET /api/v1/finops/costs/daily

Get daily cost breakdown.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
startDatestringNoStart date (ISO 8601)
endDatestringNoEnd date (ISO 8601)
resourceTypestringNoFilter by resource type

Response 200 OK

{
"days": [
{ "date": "2025-02-01T00:00:00Z", "total": 410.22 }
],
"summary": {
"total_period": 12306.6,
"daily_average": 410.22,
"trend": "stable"
}
}

GET /api/v1/finops/costs/forecast

Get cost forecast projections.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
monthsintegerNoNumber of months to forecast (default: 3)
modelstringNoForecast model to use

Response 200 OK

{
"historical": [],
"predictions": [
{
"date": "2025-03-01",
"predicted": 8500,
"lower_bound": 8000,
"upper_bound": 9000
}
],
"analysis": {
"trend": "stable",
"monthly_growth_rate": 0.02,
"confidence": "medium"
}
}

GET /api/v1/finops/costs/services

Get cost breakdown grouped by service.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
periodstringNoTime period (e.g. monthly, weekly); default 30d
startDatestringNoStart date (ISO 8601)
endDatestringNoEnd date (ISO 8601)

Response 200 OK

{
"items": [
{
"group_key": "llm",
"name": "LLM",
"total_cost": 4321.0,
"cpu_cost": 100,
"ram_cost": 50,
"storage_cost": 25,
"network_cost": 10,
"gpu_cost": 4136
}
],
"total_cost": 4321.0,
"period_start": "2025-02-01T00:00:00Z",
"period_end": "2025-02-28T00:00:00Z"
}

GET /api/v1/finops/costs/anomalies

Detect cost anomalies.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoNumber of days to look back (default: 30)
thresholdnumberNoAnomaly detection threshold (default: 2.0)

Response 200 OK

{
"anomalies": [],
"period": { "days": 30, "threshold": 2.0 }
}

GET /api/v1/finops/costs/savings

Get cost savings recommendations.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
categorystringNoSavings category to filter by (e.g. rightsizing)
minSavingsnumberNoMinimum savings amount threshold

Response 200 OK

{
"recommendations": [
{
"resource": "workflow-worker-abc",
"category": "rightsizing",
"currentCost": 200,
"potentialSavings": 60,
"efficiency": 0.3,
"recommendation": "Resource utilization is 30%. Consider reducing CPU/RAM requests to match actual usage."
}
],
"totalPotentialSavings": 60
}

GET /api/v1/finops/dashboard

Get FinOps dashboard overview with aggregated cost data.

Scope: finops:read

Response 200 OK

{
"stats": {},
"costTrend": {},
"monthlyCosts": {
"months": [],
"summary": {
"average_monthly": 0,
"highest_month": null,
"lowest_month": null
}
},
"topDrivers": []
}

GET /api/v1/finops/dashboard/stats

Get FinOps dashboard statistics for a given time period.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
periodstringNoTime window (default 30d)

Response 200 OK

Returns aggregated dashboard statistics for the requested window.


GET /api/v1/finops/dashboard/top-drivers

Get top cost drivers from the dashboard.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoMaximum number of drivers to return (default: 10)
periodstringNoTime window (default 30d)

Response 200 OK

Returns an ordered list of top cost-driving resources.


GET /api/v1/finops/costs/realtime

Get realtime cost data from Kubecost.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
windowstringNoTime window (e.g. 1d, 7d, 30d)
aggregatestringNoAggregation level (e.g. namespace, label)
namespacestringNoKubernetes namespace to filter by

Response 200 OK

Returns realtime cost items from Kubecost.


GET /api/v1/finops/costs/historical

Get historical cost data.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
startDatestringNoStart date (ISO 8601)
endDatestringNoEnd date (ISO 8601)
groupBystringNoGroup results by field
orgIdstringNoOrganization ID to filter by
userIdstringNoUser ID to filter by

Response 200 OK

Returns historical cost data for the supplied filters.


GET /api/v1/finops/costs/breakdown

Get multi-dimensional cost breakdown.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
windowstringNoTime window (e.g. 1d, 7d, 30d)
orgIdstringNoOrganization ID to filter by
userIdstringNoUser ID to filter by
resourceTypestringNoResource type to filter by
groupBystringNoGroup results by field

Response 200 OK

Returns a multi-dimensional cost breakdown with totals and grouped items.


GET /api/v1/finops/costs/efficiency

Get resource efficiency metrics.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
windowstringNoTime window (e.g. 1d, 7d, 30d)
namespacestringNoKubernetes namespace to filter by
aggregatestringNoAggregation level

Response 200 OK

Returns CPU / RAM / GPU efficiency metrics broken down by resource.


GET /api/v1/finops/costs/trends

Get cost trend time-series data.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
windowstringNoTime window (e.g. 1d, 7d, 30d)
granularitystringNoData point granularity (e.g. hourly, daily, monthly)
groupBystringNoGroup results by field

Response 200 OK

Returns time-series cost points with totals and change percentages.


GET /api/v1/finops/costs/top-drivers

Get top cost-driving resources.

Scope: finops:read

Query Parameters

ParameterTypeRequiredDescription
windowstringNoTime window (e.g. 1d, 7d, 30d)
limitintegerNoMaximum number of drivers to return
compareWindowstringNoComparison time window for change analysis

Response 200 OK

Returns the top cost-driving resources for the window, with optional change vs. compareWindow.


GET /api/v1/finops/data-health

Get the health status of cost data collection, including coverage percentages and any data gaps.

Scope: finops:read

Response 200 OK

Returns the FinOps data collection health report.