Skip to main content

Quantum Media Technologies

ai-cost

One command tells what the AI-assisted work of any project cost: it reads what Claude Code, Codex CLI, Gemini CLI and Grok Build CLI already wrote to disk and the calls your own app reports — nothing is sent anywhere.

Install

pipx install ai-costs        # or: npm install -g ai-costs

Run

ai-cost report --session latest
Answer Question Sample
Real cost What did you pay? 54.71 USD
API-only cost The same tokens with no subscription 175.02 USD
Vendor quote What an outside firm would charge profile consultancy-eu

Your own app

ai-cost log --provider openai --model gpt-5.5 --input 1200 --output 300 --ref job-42

One line per request, from a shell, Python, Node or any language that can append to a file.

Supports · version 2.13.0

Reads Claude Code · Codex CLI · Gemini CLI · Grok Build CLI · GitHub usage report and counts · your own app's usage log
Embeds in an app Python: ai_cost.api · any language: ai-cost --instance DIR (EMBED.md)
Per tenant or feature Labels on each call · --where / --by
Apps elsewhere collect HOST:PATH over ssh · import usage from a log stream
Prices Anthropic · OpenAI · Google · xAI · DeepSeek · Alibaba · Xiaomi · GitHub
Runs on macOS · Linux
Needs No Claude Code, no account, no network

Docs

First 10 minutes docs/SETUP.md
Commands docs/COMMANDS.md
Real, API-only, vendor docs/ANSWERS.md
Sources it reads docs/SOURCES.md
Your plans and prices docs/CONFIGURATION.md
Report your own app's calls docs/USAGE-LOG.md
Embed it in an app docs/EMBED.md
JSON output docs/JSON.md
Limits docs/LIMITS.md
For AI agents AGENTS.md

Python 3.9 or newer · MIT · Quantum Media Technologies · Trademarks

Metadata

Release files for ai-costs 2.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-costs 2.13.0
File Size Uploaded Provenance Actions
ai_costs-2.13.0.tar.gz 393.7 kB With provenance Details for ai_costs-2.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ai-costs 2.13.0
File Interpreter ABI Platform Actions
ai_costs-2.13.0-py3-none-any.whl Python 3 none any Details for ai_costs-2.13.0-py3-none-any.whl

Total release size: 837.7 kB

Release files / ai_costs-2.13.0.tar.gz

Download URL ai_costs-2.13.0.tar.gz
Size 393.7 kB
Tags Source
SHA-256 checksum
How to use checksums
816915d71238567445301d4b24349a31d66e5e218ab278eef9c3631f28621a17
BLAKE2b-256 checksum
How to use checksums
2a1e326259d771a0330628215954769812329b819c5a1d2fd1891278eadd8ae1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / ai_costs-2.13.0-py3-none-any.whl

Download URL ai_costs-2.13.0-py3-none-any.whl
Size 444.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
130867afa6c578452306f55c9f3e1e898b85d23574f15e351a89250ebaaf2f98
BLAKE2b-256 checksum
How to use checksums
4ab8fdad9e0b9f15d7922d855f77a57e6db591e5b4b36a9b4d2294b51979048c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for ai-costs 2.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ai_costs-2.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page