orkunkinay/openai_cost_calculator

Calculate exact USD cost of each OpenAI API call — no guesswork.

56
/ 100
Established

This tool helps developers accurately calculate the USD cost for each API call made to OpenAI or Azure OpenAI, whether using Chat Completions or the Responses API, even with streaming. You provide the response object from an OpenAI API call, and it outputs a precise cost breakdown. It's designed for software developers who are integrating LLMs and need to monitor or bill for API usage.

Available on PyPI.

Use this if you need a lightweight, independent utility to get exact cost estimates for your OpenAI API calls without a larger LLM framework.

Not ideal if you need cost estimation for multiple LLM providers beyond OpenAI, or require a full LLM routing and orchestration framework.

LLM development API cost management AI application development usage tracking developer tools
No Dependents
Maintenance 10 / 25
Adoption 5 / 25
Maturity 25 / 25
Community 16 / 25

How are scores calculated?

Stars

12

Forks

6

Language

Python

License

Last pushed

Mar 09, 2026

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/orkunkinay/openai_cost_calculator"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.