---
title: "Post Training Usage"
method: POST
path: "/api/billing/training-usage"
tags: ["billing"]
---

# Post Training Usage

`POST /api/billing/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.

## Request body

- TrainingUsageBody
  - `runId` string, required
  - `costCents` integer, required
  - `gpu` string, nullable
  - `provider` string, nullable
  - `method` string, nullable
  - `model` string, nullable
  - `estimate` object, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/freesolo/apis/platform-backend.md) · [All operations](https://skmtc.dev/freesolo/apis/platform-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/freesolo/platform-backend/revisions/5626e92675af/schema)
