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

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

{"stackTrail":"paths:/billing/internal/finalize-indexing:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

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