CometAPI Pricing Reconciliation Checklist: Failure-Mode Checklist for 2026-05-08
Last reviewed: 2026-05-08
This checklist is for teams that need to reconcile CometAPI usage, pricing assumptions, token budgets, and invoice-facing records before approving spend. It is written for finance operations, platform engineering, and AI product owners who need a repeatable process rather than a one-time billing spot check.
For site context, see the AI cost controls hub at /sites/ai-cost-controls/ and related operational drafts at /sites/ai-cost-controls/posts/. Editorial scope and review standards are listed at /sites/ai-cost-controls/editorial/.
Key takeaways
- Treat pricing reconciliation as a control loop: collect usage, normalize records, map each request to the correct model and pricing rule, compare expected cost with reported cost, then investigate variance.
- Do not rely on hard-coded pricing tables without a review step. Confirm current CometAPI documentation and help-center guidance before using prices in production cost calculations.
- Separate “usage correctness” from “price correctness.” A billing mismatch may come from token counting, retries, fallback routing, model alias changes, missing metadata, timezone cutoffs, or invoice aggregation.
- Validate failure modes with controlled test requests before using reconciliation logic for month-end approval.
- Keep thresholds, such as acceptable variance percentages, configurable. Example thresholds in this draft are starting points to tune, not universal facts.
Concise definition
CometAPI pricing reconciliation is the process of comparing application-side request logs, token counts, selected models, retry/fallback behavior, and billing exports against the applicable CometAPI pricing documentation and account records to determine whether expected AI API cost aligns with reported or invoiced cost.
Evidence basis and scope
This draft uses the public CometAPI API documentation entry point, the referenced CometAPI documentation page, and the CometAPI help center as evidence sources: https://apidoc.cometapi.com/, https://apidoc.cometapi.com/doc-873788, and https://apidoc.cometapi.com/help-center.
Because pricing and model availability can change, this article does not publish fixed current prices, vendor rankings, benchmark claims, or guaranteed savings outcomes. Instead, it provides a validation workflow for reconciling your own records against the current CometAPI documentation and account-facing billing artifacts.
Reconciliation inputs to collect
Before calculating variance, collect the following records for the same date range and timezone:
Application request logs
- Request ID or trace ID.
- Timestamp with timezone.
- User, tenant, project, or cost-center identifier.
- Requested model name.
- Resolved model name, if your gateway supports aliases.
- Prompt token count.
- Completion token count.
- Total token count.
- Streaming or non-streaming flag.
- Retry count.
- Fallback route, if any.
- Error status and final status.
CometAPI-facing usage or billing records
- Exported usage records, dashboard figures, invoice detail, or other account records available to your organization.
- Billing period start and end.
- Currency and tax handling, if relevant.
- Any credits, coupons, minimums, prepayments, or account-level adjustments.
Pricing reference
- Current CometAPI documentation and any account-specific terms your organization has accepted.
- Use the CometAPI documentation entry point and relevant documentation page to verify applicable pricing references rather than depending only on cached assumptions: https://apidoc.cometapi.com/ and https://apidoc.cometapi.com/doc-873788.
Internal routing configuration
- Model aliases.
- Default model by environment.
- Fallback model order.
- Retry policy.
- Rate-limit backoff behavior.
- Batch or async job settings.
- Token truncation rules.
Core reconciliation checklist
1. Freeze the reconciliation window
Pick one window and use it consistently.
Recommended fields:
period_start_utcperiod_end_utcbilling_timezoneexport_generated_atsource_system
Practical validation steps:
- Confirm whether billing records are grouped by UTC, account-local time, or another timezone.
- Re-run the same query twice and verify the row count is stable.
- Compare one known request near midnight against both application logs and billing records.
- Keep month-end boundary checks separate from normal daily variance checks.
Failure modes to test:
- Requests just before and after midnight are assigned to different periods.
- Dashboard totals include late-arriving records while your export does not.
- Application logs use local time and billing records use UTC.
- A retry started in one period but completed in another.
2. Normalize model identifiers
Model names may appear differently across application code, gateway configuration, and billing records. Normalize them before applying any pricing rule.
Create a mapping table like this:
| Field | Example purpose |
|---|---|
requested_model | What the application requested |
resolved_model | What was actually sent to CometAPI |
billing_model | What appears in billing or usage records |
pricing_model_key | Internal key used by reconciliation logic |
effective_from | When the mapping became valid |
effective_to | When the mapping stopped being valid |
Practical validation steps:
- Select 20 recent requests across production routes and confirm each has a resolvable pricing model key.
- Verify all aliases have effective dates.
- Confirm fallback routes record the final model actually used.
- Check current documentation before adding or modifying a model-pricing mapping. Start with the CometAPI docs home and the referenced documentation page: https://apidoc.cometapi.com/ and https://apidoc.cometapi.com/doc-873788.
Failure modes to test:
- A model alias changes but reconciliation still maps to the old model.
- Fallback traffic is billed under a different model than expected.
- Development and production use different default models.
- Deprecated or renamed models remain in historical logs.
3. Recalculate tokens independently where possible
If your application records token counts, compare them with usage records instead of assuming they are always identical.
Practical validation steps:
- Store prompt, completion, and total token counts per request when available.
- Reconcile totals by model, day, and tenant.
- Compare application-side token totals with billing-side token totals.
- Investigate large differences before approving invoice estimates.
Suggested example variance bands to tune:
- 0% to 1%: usually acceptable for automated pass, depending on your systems.
- 1% to 5%: review sample records.
- More than 5%: block approval until investigated.
These are example operating thresholds only. Tune them based on your own logging quality, traffic mix, and billing requirements.
Failure modes to test:
- Streaming responses log prompt tokens but not completion tokens.
- Cancelled requests are recorded differently by application logs and billing records.
- Tool calls, system prompts, or hidden routing prompts are excluded from app-side estimates.
- Retries duplicate application logs but not final successful requests, or vice versa.
4. Account for retries and fallbacks
Retries and fallbacks are common sources of cost drift. A user may see one answer, while the system made several billable attempts.
Practical validation steps:
- Log every attempted call, not just the final response.
- Add
attempt_number,parent_request_id, andfallback_reason. - Separate user-visible completions from backend attempts.
- Summarize cost by final outcome:
- success without retry
- success after retry
- success after fallback
- failure after all attempts
Failure modes to test:
- The reconciliation job counts only final responses.
- Retried requests are billed but missing from product analytics.
- Fallback calls use a higher-cost model than the original request.
- Timeout behavior creates “unknown” attempts that later appear in billing records.
Sanitized pricing-check example
The following curl-style example shows the shape of a controlled test request for reconciliation. Replace the placeholder URL, model, and key with your approved environment values. Do not use production customer data in reconciliation tests.
curl -X POST “https://api.example.invalid/v1/chat/completions"
-H “Authorization: Bearer REDACTED_TEST_KEY”
-H “Content-Type: application/json”
-H “X-Cost-Center: finops-reconciliation-test”
-H “X-Trace-Id: recon-2026-05-08-001”
-d ‘{
“model”: “REPLACE_WITH_APPROVED_TEST_MODEL”,
“messages”: [
{
“role”: “system”,
“content”: “Return a concise answer. This is a billing reconciliation test.”
},
{
“role”: “user”,
“content”: “Summarize why request IDs are useful for invoice reconciliation in one sentence.”
}
],
“max_tokens”: 80,
“temperature”: 0
}’
Validation steps for this test:
- Record the trace ID, timestamp, requested model, response status, and returned usage fields.
- Confirm the request appears in your application logs.
- Confirm the request appears in CometAPI-facing usage or billing records for the same period.
- Compare prompt tokens, completion tokens, and total tokens.
- Apply the current pricing rule verified from CometAPI documentation rather than a stale local constant.
- Save the test as a recurring canary, but keep expected prices configurable.
Failure-mode checklist for 2026-05-08 review
Use this checklist during billing close, model migration, or cost-control rollout.
Pricing-reference failures
- Pricing was copied into code without an owner or review date.
- Pricing rules do not identify their documentation source.
- Pricing page was checked, but account-specific terms were not.
- Historical costs were recalculated using current prices instead of period-correct prices.
- Currency, tax, credits, or adjustments were mixed into raw usage cost.
Usage-record failures
- Request IDs are missing or non-unique.
- Token counts are unavailable for a material share of traffic.
- Streaming completions are under-counted.
- Failed requests are excluded without confirming whether attempts were billable.
- Batch, async, or background jobs are outside the normal logging pipeline.
Routing and fallback failures
- Application requested one model but gateway resolved another.
- Fallback model was not stored.
- Retry attempts were collapsed into one row.
- Model alias changed mid-period without effective-date tracking.
- Test, staging, and production traffic share the same billing account but not the same tags.
Reconciliation-process failures
- Billing export and application logs use different timezones.
- Month-end boundary records were not sampled.
- Variance threshold is hard-coded and not approved by finance or engineering.
- Reconciliation job does not retain input snapshots.
- Manual adjustments are not tracked with reason codes.
Approval failures
- Invoice approval relies only on dashboard totals.
- Product owners cannot explain major cost-center changes.
- No owner is assigned for unresolved variance.
- Reconciliation exceptions are not reviewed before payment approval.
- Documentation links are not stored with the approval record.
Recommended reconciliation workflow
Step 1: Build a period-specific pricing table
Create an internal table with effective dates and source references.
Minimum fields:
| Field | Description |
|---|---|
pricing_model_key | Internal normalized model key |
source_url | Documentation or contract reference |
effective_start | Start of validity |
effective_end | End of validity, nullable |
input_unit_price | Input token price or relevant unit price |
output_unit_price | Output token price or relevant unit price |
currency | Currency used |
reviewed_by | Owner who confirmed the rule |
reviewed_at | Review date |
Validation steps:
- Require a source URL for every active pricing row.
- Store the date the source was checked.
- Do not overwrite historical rows; close them with
effective_end. - Confirm ambiguous pricing questions through official documentation or support resources. The CometAPI help center is one starting point for support and operational guidance: https://apidoc.cometapi.com/help-center.
Step 2: Join usage to pricing
Join each usage row to exactly one pricing row.
Validation checks:
- Count rows with no pricing match.
- Count rows with multiple pricing matches.
- Count rows with null token counts.
- Count rows with missing model mappings.
- Count rows outside the pricing effective-date range.
Block automated approval if:
- Any production usage row lacks a pricing rule.
- Any model mapping is ambiguous.
- Any material tenant or cost center has missing usage attribution.
- Variance exceeds your approved threshold.
Step 3: Compare expected and reported totals
Calculate expected totals at multiple levels:
- By day.
- By model.
- By tenant or cost center.
- By product feature.
- By environment.
- By retry/fallback category.
Useful comparisons:
| Comparison | Why it matters |
|---|---|
| App tokens vs billing tokens | Finds logging and counting gaps |
| Expected cost vs reported usage cost | Finds pricing or mapping errors |
| Reported usage cost vs invoice total | Finds credits, tax, minimums, and adjustments |
| Tenant totals vs cost-center allocation | Finds attribution errors |
| Current period vs prior period | Finds sudden behavior changes |
Step 4: Investigate variance by pattern
Start with grouped variance before inspecting individual requests.
Common patterns:
- One model has high variance: check model mapping or pricing rule.
- One day has high variance: check export timing, incidents, or timezone cutoffs.
- One tenant has high variance: check feature rollout, abuse, or missing tags.
- Completion tokens are high: check prompt design, max token settings, or response verbosity.
- Retry cost increased: check upstream latency, timeout values, or fallback policy.
Step 5: Preserve an audit packet
For each billing period, save:
- Usage export snapshot.
- Pricing table snapshot.
- Model mapping snapshot.
- Reconciliation job version.
- Variance report.
- Manual adjustment list.
- Documentation sources checked.
- Approval record.
This makes later investigations easier when pricing pages, model names, or routing policies change.
Practical validation plan
Run these tests before relying on the checklist for production approval.
Test A: Single known request
Goal: prove one request can be traced end-to-end.
Steps:
- Send one sanitized test request with a unique trace ID.
- Confirm application logs capture the trace ID and model.
- Confirm usage records show the same or joinable identifier.
- Compare token counts.
- Apply the period-specific pricing rule.
- Save the result as the baseline canary.
Pass condition:
- The request is visible in all required systems and reconciles within your approved tolerance.
Test B: Retry scenario
Goal: prove retries are counted correctly.
Steps:
- Trigger a controlled retry in a non-production environment.
- Confirm each attempt has an attempt number.
- Confirm the final user-visible response is linked to all attempts.
- Confirm reconciliation includes all relevant attempts.
Pass condition:
- Total expected cost reflects the attempts your billing records show, not only the final answer.
Test C: Fallback scenario
Goal: prove fallback routing does not hide cost.
Steps:
- Configure a controlled fallback route.
- Send a test request with a trace ID.
- Confirm requested model and resolved model are both stored.
- Confirm pricing uses the resolved billable model.
Pass condition:
- The reconciliation output explains which model was priced and why.
Test D: Month-boundary scenario
Goal: prove the billing window is correct.
Steps:
- Sample requests around the start and end of the billing period.
- Compare application timestamps with billing-period inclusion.
- Confirm timezone assumptions.
- Document the period cutoff rule.
Pass condition:
- Boundary records are assigned consistently and can be explained.
Test E: Documentation freshness scenario
Goal: prove pricing rules are not stale.
Steps:
- Select every active pricing rule.
- Confirm it has a source URL.
- Confirm the source was checked during the review window.
- Confirm changes create new effective-dated rows instead of overwriting history.
Pass condition:
- Every active pricing rule is traceable to a reviewed source or approved contract record.
Operational controls to add
For stronger cost governance, add these controls to the reconciliation process:
- Daily anomaly report: alert when token spend or request count exceeds a tuned baseline.
- Model-mapping diff: notify owners when gateway routing changes.
- Pricing-source review: require periodic review of source URLs and account terms.
- Cost-center enforcement: reject or flag requests without tenant or project metadata.
- Retry budget: cap retry attempts by route and record the reason for every retry.
- Fallback approval: require explicit approval for fallback to a materially different cost profile.
- Export integrity check: hash and archive billing exports used for approval.
- Exception register: track unresolved variance with owners, due dates, and decisions.
FAQ
Is this checklist a substitute for official CometAPI pricing documentation?
No. Use this checklist to structure your reconciliation process. Confirm current pricing, documentation, and account-specific terms through official CometAPI resources such as the API documentation and help center: https://apidoc.cometapi.com/ and https://apidoc.cometapi.com/help-center.
Should we hard-code CometAPI prices in our application?
Avoid hard-coding prices directly in application logic. Use an effective-dated pricing table or configuration layer with source URLs, review dates, and owners. That makes changes auditable and prevents historical periods from being recalculated with the wrong rule.
What variance threshold should trigger investigation?
Use a configurable threshold approved by finance and engineering. As a starting point, some teams review variance above 1% and block approval above 5%, but those numbers are examples to tune. Your threshold should reflect traffic volume, logging quality, contractual requirements, and risk tolerance.
How do retries affect reconciliation?
Retries can create additional API attempts that may not be obvious from user-facing analytics. Log every attempt with a parent request ID and attempt number. Reconcile backend attempts, not just final user-visible responses.
How do fallbacks affect reconciliation?
Fallbacks can change the actual model used. Store both the requested model and the resolved model. Price the request according to the model and usage reflected in your billing records and current pricing reference.
What should we do if application token counts differ from billing records?
Group the variance by model, day, route, and response mode. Check streaming behavior, cancelled requests, retries, hidden system prompts, and missing completion tokens. If the difference remains unexplained, preserve the evidence packet and use official support or help resources.
How often should pricing sources be reviewed?
Review pricing sources before billing close, before model migrations, and whenever routing or model configuration changes. Also perform a scheduled review at a cadence appropriate for your spend level and approval process.
Sources checked
| Source | Access date | Purpose |
|---|---|---|
| CometAPI API documentation | 2026-05-08 | Used as the public documentation entry point for API and operational reference checks. |
| CometAPI documentation page doc-873788 | 2026-05-08 | Used as the referenced CometAPI documentation page to verify pricing-related or model-reference assumptions before reconciliation. |
| CometAPI help center | 2026-05-08 | Used as a support and guidance reference for questions that cannot be resolved from local logs or documentation alone. |