burnrate_track
Log the actual cost of an LLM call after execution. Call this after every LLM request to build calibration data that improves burnrate_estimate accuracy over time. Free — no credits charged. Returns the recorded cost entry with computed margin versus the prior estimate when one exists for this model and token range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model identifier as returned by the provider. Examples: claude-sonnet-4-6, gpt-4o, gemini-2.0-flash, mistral-large-latest. Unknown models are accepted but cost may show as $0. | |
| task_id | No | Optional task ID for cross-referencing spend with DedupQ deduplication results. Use the same task_id passed to dedupq_check to link cost tracking with deduplication. | |
| provider | Yes | LLM provider identifier. Supported: anthropic, openai, google, mistral, cohere, deepseek, together, fireworks, groq. Must match the provider of the model used. | |
| input_tokens | Yes | Actual prompt tokens used. Must be >= 0. | |
| output_tokens | Yes | Actual completion tokens used. Must be >= 0. | |
| cache_read_tokens | No | Optional. Cache-read tokens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| tracked | No | ||
| provider | No | ||
| record_id | No | ||
| request_id | No | ||
| credits_used | No | ||
| input_tokens | No | ||
| output_tokens | No | ||
| pricing_found | No | ||
| actual_cost_usd | No | ||
| credits_remaining | No | ||
| fallback_behavior | No | ||
| actual_cost_usd_formatted | No |