Tokens
to Dollars.
The API that turns token usage into real dollars instantly. Clear, direct, and easy to wire into your stack. Use for comparing between models, or keeping track of dollar costs in real time.
The API that turns token usage into real dollars instantly. Clear, direct, and easy to wire into your stack. Use for comparing between models, or keeping track of dollar costs in real time.
You're holding the response, which includes token usage.
Pruning keeps your prompts and completions private.
We identify model and pricing tier, do the calculations, and send you the cost in dollars.
{
"id": "chatcmpl-E8h2cFyj5u8HXMpvhj1zwvy0ADEQm",
"object": "chat.completion",
"created": 1785740782,
"model": "gpt-4o-2024-08-06",
"choices": ["pruned"],
"usage": {
"prompt_tokens": 233256,
"completion_tokens": 110,
"total_tokens": 233366,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
"system_fingerprint": "fp_e160a45017"
}
{
"success": true,
"cost_usd": 0.58424,
"provenance": {
"url": "https://developers.openai.com/api/docs/pricing.md",
"last_scraped_at": "2026-07-31 12:54:59 UTC",
"pricing_object_extracted_at": "2026-07-31 13:19:32 UTC"
},
"calculations_usd": [
"233256 prompt tokens at $2.5/million = USD 0.58314.",
"110 completion tokens at $10/million = USD 0.00110.",
"Total all tokens = USD 0.58424."
]
}
Most models from OpenAI, Google and Anthropic are covered. New models are added regularly.
Simple REST API with a useful free tier.
Every response includes provenance for the pricing data, as well as calculation details.