billing

Post Training Cost

Record a training run's realized provider cost (COGS) for estimator accuracy.

Machine-to-machine: the flash control plane's reconciliation job calls this after a run finishes, authenticated with the operator internal key (NOT a user key -- this is COGS, not a customer charge). Upserts training_run_cost keyed by runId; the org and the charged estimate are joined in later (the training_cost_accuracy view), so no org id is needed here. Idempotent: a re-pulled run (provider billing lags) records once.

post/api/billing/training-cost

Request body

runIdstring required
realizedCostUsdnumber required
providerstring nullable
gpustring nullable
costByResourceobject nullable
wallSecondsnumber nullable
costBasisstring nullable
sourceobject nullable

Response

Successful Response

object required

Changes

No recorded changes to this endpoint across all 1 revision of this API.