in the JSON response, perhaps under usage, you give the cost of the session.
we are using CLI in testing and it is valuable to know even the approximate cost when models use our tools . most useful would be to separate out the promotional cost, from the standard (which we care about).
Thanks for the suggestion, and for explaining why it matters for your testing setup. We do have this as a backlog item, but it is not the highest priority right now.
Today, the headless JSON usage object reports token counts only (inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens), not a dollar figure. Converting those into cost (and splitting standard from discounted) relies on billing-side pricing that lives on the server, so the CLI cannot compute it locally right now. I have shared this with the team as a feature request.
In the meantime, if you are on a Team or Enterprise plan, the Admin API gives you this breakdown per request today and already flags headless calls. POST /teams/filtered-usage-events returns, per event:
tokenUsage.totalCents: the standard (undiscounted) model cost
tokenUsage.discountPercentOff: the promotional discount, if any
chargedCents: the amount actually charged (model cost plus Cursor Token Rate where applicable)
isHeadless: whether the request came from a headless session
So you can pull events for a time window, filter to isHeadless: true, and reconcile a run by matching events to your CLI runs by timestamp (and user). Data is aggregated hourly, so poll at most once per hour. Docs: Admin API | Cursor Docs
I know it’s not the same as having the number inline in the CLI JSON, but it should unblock cost attribution or your test runs today. We will share updates here as the inline version progresses.