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.1

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.1

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.1
File Size Uploaded Provenance Actions
ai_costs-2.12.1.tar.gz 392.3 kB With provenance Details for ai_costs-2.12.1.tar.gz

Built distribution (wheel)

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

Total release size: 834.9 kB

Release files / ai_costs-2.12.1.tar.gz

Download URL ai_costs-2.12.1.tar.gz
Size 392.3 kB
Tags Source
SHA-256 checksum
How to use checksums
49db8605212d957b7aab8582a9526c347f1bebf291551529679ad01de72a6451
BLAKE2b-256 checksum
How to use checksums
a56df5176b88ef8497e32859814350b23741fbf45c59104184b7f6a7f03f99af
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 18, 2026.

Transparency log

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

Download URL ai_costs-2.12.1-py3-none-any.whl
Size 442.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59e736fbe97da631f19dff6e7d014c8f0dfae5c50f8df74679f41ea6515bbd71
BLAKE2b-256 checksum
How to use checksums
f8a739d7d75d77eed0f5fb1baf40946c35b3095fac0c0dd4dbc6f3bef9190cd7
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 18, 2026.

Transparency log

Security for ai-costs 2.12.1

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.1.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 18, 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