TokenBudget
Open source AI cost tracking. One line to start tracking.
Install
pip install tokenbudget
Quick Start
import openai, tokenbudget
client = tokenbudget.wrap(
openai.Client(),
api_key="tb_ak_..." # free at tokenbudget.com
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
# Everything tracked automatically in your dashboard
Anthropic Support
import anthropic, tokenbudget
client = tokenbudget.wrap(
anthropic.Anthropic(),
api_key="tb_ak_..."
)
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}]
)
Features
- One line integration — wrap your existing client, done
- Zero latency impact — tracking runs in background
- Feature tagging — know cost per feature, user, project
- Multi-provider — OpenAI + Anthropic (Gemini coming soon)
- Privacy first — we never store prompts, responses, or API keys
Tagging
with tokenbudget.tags(feature="chatbot", user_id="user-123"):
response = client.chat.completions.create(...)
Dashboard
See your costs at tokenbudget.com — broken down by feature, user, model, and project.
Self-Hosting
# Copy or extract the project folder, then:
cd tokenbudget-main
docker compose up -d
License
Apache 2.0 — Free for personal and open source use. Commercial use requires license. See LICENSE.
Metadata
Release files for nebeso 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nebeso-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / nebeso-0.1.0-py3-none-any.whl
| Download URL | nebeso-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b8bf6f215d3473baeb2ec805e81d0b68fad65f42c01a239470c1475837572a8
|
|
BLAKE2b-256 checksum How to use checksums |
ef0e78158d0902a5f5204ffe2e91fb2f8c91c7f7e7f9560fcb97f8a831bc2f9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|