FOCUS-compatible CSV export

April 20, 2026 · View on GitHub

InferCost exports UsageReport data as CSV that conforms to the FOCUS specification (FinOps Open Cost and Usage Specification). Standard FOCUS v1 columns are populated so the export drops into any FOCUS-aware consumer (Kubecost, Cloudability, internal BI) without a custom importer. On-prem inference specifics — GPU model, token counts, power, cloud-equivalent cost — live in x-Infer* extension columns, which FOCUS explicitly allows for vendor-specific dimensions.

Why

FOCUS v1 was designed around SaaS cloud billing. It has no column for "GPU amortization" or "tokens consumed" — the fields an on-prem AI FinOps program actually needs. Rather than invent a proprietary schema or fork FOCUS, InferCost follows the spec's extension convention (x- prefix) and populates the standard columns with the closest natural analogue.

A finance team that already pipes OpenCost → Kubecost → their BI stack can add InferCost's CSV as another data source and slice the whole AI spend alongside cloud spend on the same dashboard.

Running the export

CLI:

# All UsageReports in the cluster, to stdout
infercost export focus

# Scope to one namespace + write to a file
infercost export focus --namespace engineering --out engineering-april.csv

# Filter by period (matches UsageReport.status.period)
infercost export focus --period 2026-04 --out april-2026.csv

# Tag with a region for multi-cluster aggregation
infercost export focus --region us-east-1-prod --out prod-cluster.csv

Pipe into standard tools:

# Only charges above \$1
infercost export focus | awk -F, 'NR==1 || \$1+0 > 1.0'

# Total spend by namespace
infercost export focus --period 2026-04 | \
  awk -F, 'NR>1 {by_ns[\$29]+=\$1} END {for (n in by_ns) print n, by_ns[n]}'

Row shape

One row per (UsageReport, ModelCostBreakdown). A report with three models produces three rows; a report with no model breakdown (e.g. warming up, pods missing) produces one rollup row so the namespace still appears in finance exports.

Column reference

Standard FOCUS v1 columns

ColumnValueNotes
BilledCostComputed on-prem cost for the rowSame as EffectiveCost / ListCost / ContractedCost — no discount model on-prem
EffectiveCostSame as BilledCost
ListCostSame as BilledCost
ContractedCostSame as BilledCost
ChargePeriodStartUsageReport.status.periodStartRFC3339
ChargePeriodEndUsageReport.status.periodEndRFC3339
BillingPeriodStartFirst of the month containing the chargeRFC3339
BillingPeriodEndFirst of the next monthRFC3339
CurrencyUSDAlways
ServiceNameOn-Prem AI Inference
ServiceCategoryAI and Machine LearningFOCUS v1 canonical enum value
ProviderNameInferCost
PublisherNameSelf-Hosted
InvoiceIssuerNameSelf-Hosted
ResourceId<ns>/<report>/<model> (or <ns>/<report>)Stable per row
ResourceNameModel name (or report name for rollups)
ResourceTypeAI Inference Endpoint
Region--region flag valueEmpty unless explicitly set
UsageQuantityTotal tokens (input + output)
UsageUnitTokens
PricingUnit1M Tokens
PricingCategoryUsage-Based
ChargeCategoryUsageFOCUS v1 enum
ChargeClassemptyNon-empty would indicate a correction
ChargeDescriptionHuman-readable summary of the charge
ChargeFrequencyUsage-Based
SkuIdModel name
SkuPriceIdModel name
SubAccountIdKubernetes namespaceFor per-team chargeback
SubAccountNameKubernetes namespace
TagsJSON object with report/schedule/model/gpuModel

InferCost extension columns (x-Infer*)

ColumnValue
x-InferCostProfileName of the CostProfile this row references
x-InferGpuModelGPU model declared on the profile
x-InferGpuCountNumber of GPUs on the profile
x-InferTokensInputInput tokens for this row
x-InferTokensOutputOutput tokens for this row
x-InferAmortizationYearsAmortization window from the profile
x-InferElectricityRatePerKWhRate from the profile
x-InferPUEFactorPUE from the profile
x-InferCloudEquivalentProviderProvider with highest savings vs on-prem
x-InferCloudEquivalentModelModel name in that provider
x-InferCloudEquivalentCostUSDWhat the tokens would have cost there
x-InferSavingsUSDCloudEquivalent − on-prem
x-InferSavingsPercentSavings as a percentage

The cloud-equivalent columns are populated from the highest-savings entry in UsageReport.status.cloudComparison. Consumers who need the full per-provider comparison should query the CRD directly — FOCUS is a flat export, not a query layer.

FOCUS version alignment

InferCost tracks FOCUS v1.0. When FOCUS v1.1 lands with AI-inference coverage, x-Infer* columns will migrate to the standard names in a minor release with a documented column alias. Until then, the x-Infer* prefix guarantees import compatibility (FOCUS requires importers to tolerate unknown x- columns rather than reject them).

Importing into Kubecost / Cloudability

Both tools accept FOCUS CSV via their custom-import flows. The standard columns are enough for high-level spend dashboards. To unlock per-token and per-GPU-model views, add the x-Infer* columns as custom fields.

Open a GitHub issue if you hit a downstream tool that rejects a specific row — we will adjust the emission rather than tell users to work around it.