Check the cost.
Then read the record.
BeefAPI records what happened to each request and, once settlement is established, the USD amount it cost. This page shows which unit each model class uses, how cached tokens are counted, and how to read the amounts back.
USAGE RECORDS · TOKEN UNITS · CACHE
VERIFY A REQUEST COST
BEEFAPICOST CHECK
How do I check what an API request actually cost?
Where the number comes from
Each request is recorded in the Usage log with its model, time, request ID and outcome, and with a USD amount once that amount is established. The readable price list and the machine-readable pricing.usd.json read the same global USD pricebook, so the rate you compare is the rate the catalog publishes.
A record is not always complete at the moment you look. Settlement can arrive after the response, an amount can be pending, a measurement can be flagged as estimated, and a record can be missing from the window you queried. Treat a gap as "not established yet", then check the date range, the key, any filter, and the request ID before drawing a conclusion.
Match the unit before you multiply
- Text:
input_usdandoutput_usdare USD per million tokens.cache_read_usdandcache_write_usdapply where the catalog publishes them. - Images:
per_request_usdwith unitimageis USD per generated image. - Video:
per_second_usdis keyed by output resolution, plusreference_image_usdfor each reference image. - A missing
cache_read_usdorcache_write_usdmeans the catalog does not publish that rate. It does not mean the rate is zero.
Read the published units for every model
curl --fail-with-body https://global.beefapi.com/pricing.usd.jsonWorked example: an illustrative text estimate
| Component | Tokens | USD / 1M | Cost |
|---|---|---|---|
| Input (ordinary) | 2,000 | $0.60 | $0.001200 |
| Input (cache reads) | 10,000 | $0.12 | $0.001200 |
| Output | 800 | $2.40 | $0.001920 |
| Request total | 12,800 tokens | $0.004320 |
The 12,000 prompt tokens split into 2,000 ordinary input tokens and 10,000 cache reads. The same tokens are not charged twice: the cached portion belongs to the cache category, not to ordinary input as well. One unit is one million tokens, so each line above is tokens / 1,000,000 x rate.
Read it back programmatically
GET /v1/usageuses the same Bearer API key as a model call and returnssettled_amount,pending_amount,refunded_amount,unknown_records,by_modeland daily UTC totals as decimal strings.settled_amountis already net of recorded refunds. Do not subtractrefunded_amountagain.recordscounts usage records, not unique HTTP requests: one request can produce both an error record and a charge record.GET /v1/usage/requests?request_id=...looks up one request. A standalone refund adjustment appears as a negative amount.
Usage summary for the last 30 days
curl --fail-with-body 'https://global.beefapi.com/v1/usage' \
--header "Authorization: Bearer $BEEFAPI_KEY"A charge record shows that an amount was accounted for; it does not by itself show that your client received a successful response. result describes the outcome and billing_status describes settlement, and the two can disagree. usage_estimated: true means the usage measurement was estimated, which is separate from settlement, so a settled charge can still rest on an estimated measurement. An error record without an amount does not prove the request was free, because settlement can arrive later. Long-context adjustments can raise the rates that apply to a specific text request. Raw quota fields are accounting units, not USD amounts.
Still deciding
Can I know the exact cost before sending the request?
You can estimate it from the published unit and your expected input and output size, as in the worked example above. The recorded charge is what settles, and BeefAPI may reserve credit before a request runs, so a request can be rejected for insufficient credit even when the displayed balance is above zero.
A call failed but there is a charge. Which one is right?
Both can be recorded. result describes the outcome and billing_status describes settlement, and an error record and a charge record can refer to the same request. Read the fields on the request record rather than inferring from the HTTP status.
I cannot find a record at all. Does that mean it was free?
No. A missing record means the amount is not established in the window you queried. Check the date range with the request's own timestamps, confirm you are using the key that sent the request, clear any model filter, and look the request up by its request ID before deciding anything.
Sources
- BeefAPI docs · Billing and usage checked 2026-09-26
- BeefAPI docs · API overview checked 2026-09-26
- Live global USD pricebook checked 2026-09-26
Page facts checked 2026-09-26. Prices, model IDs and client configurations change; the linked sources are authoritative.