billing

Put terminal runs that were never metered back on the ledger

Writes a $0 run usage event for every TERMINAL run in this workspace that has none, so the metered-event count and the run count reconcile (E2E9-06). A run reaches this state when the API closes it because its Workflow is already gone — metering is one of the Workflow’s durable finalize steps, so it never ran. The amount is always ZERO: this is a reconciliation, never a late charge. Dry run unless apply=1. Idempotent: the ledger id is the one finalize would have used, so a finalize that arrives afterwards is a no-op rather than a double charge.

post/v1/admin/backfills/run-usage

Request

  • Base URL: https://api.hyperresearch.ai
  • URL: https://api.hyperresearch.ai/v1/admin/backfills/run-usage
  • Auth: API key in cookie hr_session

Query parameters

apply'0' | '1'

Omit (or 0) for a DRY RUN: the response lists every row that would change and nothing is written. 1 performs the rewrite.

Response

What was written, or would be

workspace_idstring required
scannedinteger required
foundinteger required
writteninteger required
appliedboolean required

False for a dry run: nothing was written.

Changes

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