A repeated-call forecast should not begin with “all cached input.” Begin with a cold row. OpenAI’s prompt-caching guide says that for GPT-5.6 and later, an eligible cache write costs 1.25× the ordinary input rate while a read costs 0.1×. One write plus one full reuse is therefore 1.35× one ordinary input, not 0.2×. The official CometAPI Astra guide identifies gpt-6-astra and lists separate short-context Standard rates for uncached input, cached input, cache writes, and output.
That upstream schedule is a hypothesis for a CometAPI trial, not the bill. The useful decision is whether an Astra workload routed through CometAPI actually exposes enough usage detail—and produces an observed charge consistent enough—to justify a cached-read forecast.
Illustrative cold/write/read experiment
No live gateway test was performed here. Use this as a controlled test plan with your existing CometAPI integration. Keep the model, tools, reasoning effort, response format, stable prefix, and any cache key unchanged. Change only a short suffix. Run the second request promptly: an identical prefix is required for reuse, but a cache key influences routing rather than guaranteeing a hit.
| Run | Intended condition | Change from prior run | Record from response | Billing interpretation |
|---|---|---|---|---|
| A | Cold population | New stable prefix | total input, cached input, cache-write input, output, latency | Count as a write only if returned usage supports it; otherwise mark unverified |
| B | First reuse | Suffix only | same fields | A positive cached count is evidence of a read; a miss is still a valid observation |
| C | Repeated reuse | Suffix only | same fields | Tests whether reuse persists; do not assume B’s result repeats |
| D | Negative control | Alter an early prefix token | same fields | Expected to reduce reusable prefix; diagnose rather than discard the row |
“Cache-write input” and “cached input” are requested observations, not promises about the CometAPI response schema. If a field is absent, write not exposed, not zero.
Bill-to-observation worksheet
Complete one line per request, using the rate card and processing/context tier applicable at the test time:
| Field | Symbol | Value |
|---|---|---|
| Total input tokens | I |
___ |
| Cached input tokens, if exposed | R |
___ / not exposed |
| Cache-write tokens, if exposed | W |
___ / not exposed |
| Ordinary input tokens | U = I - R - W |
___ / unverified |
| Output tokens | O |
___ |
| Applicable rates per token | pU, pR, pW, pO |
___ |
| Usage-derived expected charge | E = U·pU + R·pR + W·pW + O·pO |
___ / unverified |
| Observed CometAPI charge | B |
___ |
| Difference | B - E |
___ / unverified |
| Processing tier, context band, timestamp, request ID | — | ___ |
OpenAI’s guide uses the same category logic: ordinary input is total input minus cached and cache-write tokens. But do not force that formula when the gateway omits a category. Instead, preserve the raw response, mark E unverified, and compare the observed CometAPI charge across A–D.
Forecast only after reconciliation. For n calls with one measured write and n-1 measured reads, use:
forecast(n) = observed_write_charge + (n - 1) × observed_median_read_charge
Keep output and uncached-suffix costs in those observed charges. Report misses separately, because prefix changes, expiry, or routing can turn an intended read into another write or uncached request. This makes the CometAPI accounting check—not an upstream discount headline—the boundary between an experiment and a budget.