Get Cache Billing
/v1/billing/caches/{cache_id}Returns settled creation charges, storage charges, and billed usage for one explicit cache. Billing remains queryable after the cache expires or is deleted.
Cache-read charges from inference requests are excluded. Use Get Request Usage for those inference charges.
Authentication
Authorization Bearer
Send an API key (sk-...) or user JWT in the Authorization header. You can query only caches owned by the authenticated account.
Path Parameters
cache_idstringrequiredCache identifier: the part after cachedContents/ in the creation response name.
Response
codeintegerResponse status code.
msgstringResponse message.
dataobject | nulldata.cache_idstringCache identifier: the part after cachedContents/ in the creation response name.
data.namestringCache resource name.
data.modelstringModel used to create the cache.
data.currencystringCurrency of the amounts, USD.
data.statusstringCache state: pending, active, expired, deleted, or failed.
data.billing_statusstringpending: creation has not settled; in_progress: charges have settled but further charges may follow; final: billing is complete.
data.billing_finalbooleanTrue only when cache billing is complete and no further settlement remains.
data.creationobjectdata.storageobjectdata.total_amountnumberSum of settled creation and storage charges. Excludes inference requests using this cache.
data.settled_throughstring | nullUTC ISO 8601 time through which storage has been settled; null before the first storage settlement.
data.checked_atstringTime of this query in UTC ISO 8601.
service_codestring | nullStable error code when available.
trace_idstring | nullDiagnostic identifier when available.
Settlement status
total_amount contains settled charges, not an estimate of future costs. Storage charges continue to accrue while the cache is in use. Final settlement can remain pending after deletion or expiration; check billing_final.
Before creation or storage has settled, its billed value is false and its amount is 0. This does not mean that the operation is free.
Error Handling
Check the response code, following the other billing lookup endpoints:
401/ unauthenticated: missing or invalid credentials.404: unknown cache, invalid identifier, or a cache this account cannot access. Returnsdata: null.503/CACHE_BILLING_UNAVAILABLE: a reliable billing summary is temporarily unavailable. Retry later; contact support if it persists.