CLI tool for TokTab LLM pricing data
Project description
TokTab CLI
LLM pricing data at your fingertips
A command-line interface for accessing TokTab, a free API providing pricing data for 2000+ LLM models. Powered by LiteLLM and updated nightly.
Installation
# Using uvx (recommended)
uvx toktab gpt-4o
# Or install with pip
pip install toktab
Usage
Get pricing info for a specific model
toktab gpt-4o
toktab claude-3-opus
toktab gemini-1-5-flash
Output:
╭──────────────────────────────────────────────────────────────────────────────╮
│ gpt-4o (openai) │
╰──────────────────────────────────────────────────────────────────────────────╯
Pricing
Type Cost / 1M tokens
Input $2.50
Output $10.00
Context Window
Limit Tokens
Max input 128K
Max output 16K
Capabilities
✓ Vision · ✓ Functions · ✓ Tool choice · ✓ System msgs
Search for models
toktab search claude
toktab search "gemini 3"
toktab search provider:anthropic
JSON output
All commands support --json for machine-readable output:
toktab --json gpt-4o
toktab search --json claude
Options
Options:
--json Output raw JSON
--version Show version
--help Show this message and exit.
Model Slugs
Model identifiers are derived from LiteLLM model names with special characters replaced by hyphens.
For example:
gemini/gemini-pro→gemini-gemini-proanthropic/claude-3-opus→anthropic-claude-3-opus
Use the search command to find the exact slug for a model.
Features
- 🚀 Fast: Lightweight CLI with minimal dependencies
- 📊 Rich output: Beautiful tables with cost color-coding (green=cheap, yellow=medium, red=expensive)
- 🔍 Fuzzy search: Find models by name or provider
- 💰 Cost per million tokens: Easy-to-read pricing format
- 🎨 JSON output: Perfect for scripting and automation
- 🆓 Free: No API key required
Development
# Clone the repo
gh repo clone tomdyson/toktab-cli
cd toktab-cli
# Install with dev dependencies
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"
# Run tests
pytest
# Test locally
toktab gpt-4o
License
MIT License - see LICENSE for details.
Credits
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toktab-0.1.0.tar.gz.
File metadata
- Download URL: toktab-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf5fd5a0832d251a6f83a16feeba32fd2af925b44603db5313b8c79688e4c814
|
|
| MD5 |
f2528379d82a8b2f68d025681f659107
|
|
| BLAKE2b-256 |
997b14bc090371c63a2fbce66781283f47247cb134b6c5fdd3530062e1d16b59
|
Provenance
The following attestation bundles were made for toktab-0.1.0.tar.gz:
Publisher:
publish.yml on tomdyson/toktab-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toktab-0.1.0.tar.gz -
Subject digest:
cf5fd5a0832d251a6f83a16feeba32fd2af925b44603db5313b8c79688e4c814 - Sigstore transparency entry: 838889658
- Sigstore integration time:
-
Permalink:
tomdyson/toktab-cli@8157e4c6a964f0d8cf405d28bee1e54252e048c8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tomdyson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8157e4c6a964f0d8cf405d28bee1e54252e048c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file toktab-0.1.0-py3-none-any.whl.
File metadata
- Download URL: toktab-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7405c4fe76074e4908606df7769552e0e68a0ec55e57efeb44e0599ac5a8d956
|
|
| MD5 |
c1d0f7e96fded65f13afaa43f0a3b25d
|
|
| BLAKE2b-256 |
beda47faf67c88ae5e0945b578e14e7636ba21bd44d70daee9c3e9052278d926
|
Provenance
The following attestation bundles were made for toktab-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tomdyson/toktab-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toktab-0.1.0-py3-none-any.whl -
Subject digest:
7405c4fe76074e4908606df7769552e0e68a0ec55e57efeb44e0599ac5a8d956 - Sigstore transparency entry: 838889683
- Sigstore integration time:
-
Permalink:
tomdyson/toktab-cli@8157e4c6a964f0d8cf405d28bee1e54252e048c8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tomdyson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8157e4c6a964f0d8cf405d28bee1e54252e048c8 -
Trigger Event:
release
-
Statement type: