billing

Post Training Usage

Charge a managed flash training run its pre-flight cost estimate.

Machine-to-machine: the flash control plane calls this at run submit, authenticated with the SUBMITTING USER'S freesolo API key (the same key it already verifies). The backend resolves the org from that key, debits the org's prepaid balance for the estimate, and records the charge. A 402 (insufficient balance) blocks the run client-side. runId makes the report idempotent (a retried submit bills the run once).

This is separate from — and does not affect — the flat custom-model run fee (debit_for_run), which is the platform training-agent product.

post/api/billing/training-usage

Request body

runIdstring required
costCentsinteger required
gpustring nullable
providerstring nullable
methodstring nullable
modelstring nullable
estimateobject nullable

Response

Successful Response

object required

Changes