Skip to main content
Chat bills per token — /estimate runs the exact same pricing engine and token estimator that bills real traffic, so it can never disagree with what you’re actually charged.
POST /api/v1/estimate
Response
estimated_cents/estimated_cost is a realistic mid-point for this exact payload — pass messages for a real token count, or omit them and it falls back to a 5K-token reference input. estimated_max/estimated_max_cents is the ceiling: what a real request with these messages and max_tokens would preauthorize against your balance before settling down to actual usage. Nothing is ever charged more than what you actually used — estimated_max exists so you can budget for the worst case, not because it’s what you’ll typically pay. No API key needed — and the endpoint doesn’t read one either. rates are the live $/MTok numbers this model bills at; pass Authorization if you like for consistency with your other requests, but it has no effect here.
Also included: pricing_version, tier, for_count, total_estimated_cents/total_estimated (estimated_cents × count), and — when you pass models — a model_comparison array. Every cents field is a float; round for display, don’t truncate.

Parameters

Compare prices across models

Numbers above are illustrative for this example payload — real figures scale with your actual token counts. Always read live numbers from the endpoint.

Guard a batch before running it

Agents get the same guarantee over MCP — estimate_cost is one of the free MCP tools.