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.12.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.12.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.12.0
File Size Uploaded Provenance Actions
ai_costs-2.12.0.tar.gz 380.2 kB With provenance Details for ai_costs-2.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 808.6 kB

Release files / ai_costs-2.12.0.tar.gz

Download URL ai_costs-2.12.0.tar.gz
Size 380.2 kB
Tags Source
SHA-256 checksum
How to use checksums
32a28a337f8329ce23750feb3f2068fc349b321bba96c17e97d54a06b7ac1e5b
BLAKE2b-256 checksum
How to use checksums
16756eccd781dc16332360b9b38f435bcdd9af4e0e3ebee697a151f92a62c6d5
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 15, 2026.

Transparency log

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

Download URL ai_costs-2.12.0-py3-none-any.whl
Size 428.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90675628881482c6aaf0fc2ae1ad5d44b557dd4faa91f615e6dfbd226c2f827e
BLAKE2b-256 checksum
How to use checksums
b6fc3179aa8e542b4bbbdbaa30e4f74f7f6af2eccf98a0a9e52c7317f55337d1
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 15, 2026.

Transparency log

Security for ai-costs 2.12.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.12.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 15, 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