billing

Settle Prose

Settle one scoped-prose job's billing (Phase 3), called by Modal.

Idempotent via the ledger claim on prose_jobs: exactly one of settled_at / hold_released_at is claimed first-writer-wins, so a duplicate Modal dispatch, a replayed callback, or a timeout reconciliation can neither double-charge nor double-refund. Billing account (personal vs team pool) and the estimated hold come from the claimed row, never the payload. Pricing stays single-sourced: real token counts recompute the authoritative cost via llm_pricing.

post/billing/internal/settle-prose

Headers

x-service-tokenstring required

Request body

prose_job_idstring required
outcomestring
dodo_customer_idstring
actual_cost_centsinteger
actual_input_tokensinteger
actual_output_tokensinteger
completed_countinteger
failed_countinteger
providerstring
modelstring
errorstring nullable

Response

Successful Response

{"stackTrail":"paths:/billing/internal/settle-prose: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.