Dentrix Costs (Admin) API
Export Dentrix variable-cost traces for admin cost governance.
Endpoint
GET /api/admin/dentrix-costs
Access control:
- Require authenticated
adminorsuper_adminrole.
Query params
view(optional):days|runs|claims. Defaultruns.format(optional):csv|json. Defaultcsv.from(optional): start date (YYYY-MM-DD, UTC day start).to(optional): end date (YYYY-MM-DD, UTC day end).
Validation:
- Reject invalid
viewwith400. - Reject invalid
formatwith400.
Data sources
This endpoint derives trace output from:
run_costrecordsai_usagemodel usage rowspilot_batchandpilot_claim_resultoutcome rows
Views
view=days
Return daily rollups including:
- run count
- attempted/completed claim counts
- total variable cost and per-claim derived cost
- aggregation method and formula version
- model breakdown payload
view=runs
Return run-level traces including:
- job and batch identifiers
- VM runtime + pricing source
- token usage and model breakdown
- LLM/VM/browser-infra/third-party cost components
- run total variable cost and average per-claim costs
view=claims
Return claim-level allocations including:
- claim identity and run identity
- processing time and allocation weight
- weighted and equal-share claim cost values
- allocation method and fallback flags
Response formats
format=csv: file attachment response.format=json: object withheaders,rows, and typeditems.
Operational guidance
- Use
daysfor executive trend reporting. - Use
runsfor incident review and infrastructure pricing audits. - Use
claimsfor reconciliation of weighted versus equal-share cost allocation.