/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.
Full response shape
Full response shape
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.