Skip to main content

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-progemini-gemini-pro
  • anthropic/claude-3-opusanthropic-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toktab-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toktab-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for toktab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cf5fd5a0832d251a6f83a16feeba32fd2af925b44603db5313b8c79688e4c814
MD5 f2528379d82a8b2f68d025681f659107
BLAKE2b-256 997b14bc090371c63a2fbce66781283f47247cb134b6c5fdd3530062e1d16b59

See more details on using hashes here.

Provenance

The following attestation bundles were made for toktab-0.1.0.tar.gz:

Publisher: publish.yml on tomdyson/toktab-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for toktab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7405c4fe76074e4908606df7769552e0e68a0ec55e57efeb44e0599ac5a8d956
MD5 c1d0f7e96fded65f13afaa43f0a3b25d
BLAKE2b-256 beda47faf67c88ae5e0945b578e14e7636ba21bd44d70daee9c3e9052278d926

See more details on using hashes here.

Provenance

The following attestation bundles were made for toktab-0.1.0-py3-none-any.whl:

Publisher: publish.yml on tomdyson/toktab-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page