billing

Finalize Indexing

Called by Modal after successful doc generation to finalize credit debit.

Pricing is single-sourced here: when the indexer reports real token counts we recompute the authoritative cost from llm_pricing (model-aware, 2× markup) rather than trusting the indexer-side number. We also write the reconciled cost back onto the snapshot so the displayed llm_cost_cents matches what was actually billed.

post/billing/internal/finalize-indexing

Request

  • Base URL: https://api.repowise.dev (the document declares no server; this is the origin it was published from)
  • URL: https://api.repowise.dev/billing/internal/finalize-indexing
  • Auth: none declared. Required headers: x-service-token

Headers

x-service-tokenstring required

Request body

snapshot_idstring required
actual_cost_centsinteger required
estimated_cost_centsinteger required
dodo_customer_idstring required
user_idstring required
providerstring
modelstring
actual_input_tokensinteger
actual_output_tokensinteger

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 20 revisions of this API.