v14

latestOpenAPI 3.0.1Apache 2.0raw.githubusercontent.com2026-08-0151328.1 KB

query for aggregated AI inference costs

Returns a single aggregated InferenceCostSet covering the full requested window. Costs are broken down per model/namespace with blended and differentiated (input/output) cost-per-million-token rates under the chosen cost basis. Requires INFERENCE_COST_ENABLED=true.

get/inferenceCost/total

Query parameters

windowstring required

Duration of time over which to query. Accepts durations like 7d, 24h, or RFC3339 date pairs like 2024-01-01T00:00:00Z,2024-01-02T00:00:00Z.

costBasis'allocation' | 'usage'

allocation (default): max(request,usage) × price + idle + shared infra; reconciles to the infrastructure bill. usage: actual consumption only; idle and shared infra costs excluded; does not reconcile to the bill.

aggregatestring

Comma-separated dimensions to aggregate by. Supported values: model_name, model_version, namespace, cluster, pod, controller, controller_kind, container, workload_type.

accumulate'hour' | 'day' | 'week' | 'month'

Step size used internally before accumulating into the total. Accepted values: hour, day, week, month. Optional for this endpoint.

filterstring

Filter results by property values. Format: prop:value for a single filter, prop:value+prop:value for AND logic. Supported properties: model_name, model_version, namespace, cluster, pod, controller, controller_kind, container, workload_type.

Response

Success

codeinteger
statusstring