Python client for BenchGecko, the AI model data platform. Compare LLM benchmarks, estimate inference costs, and explore pricing across 55+ providers.
Project description
benchgecko
Python client for BenchGecko, the AI model data platform. Look up benchmarks, compare models head-to-head, explore provider pricing, and estimate inference costs with a clean Pythonic API and zero dependencies.
BenchGecko tracks 414 models across 55 providers and 40 benchmarks, giving developers and teams the data they need to pick the right model for every task.
Installation
pip install benchgecko
Quick Start
import benchgecko as bg
# Look up a model
model = bg.get_model("claude-3-5-sonnet")
print(model["name"]) # Claude 3.5 Sonnet
print(model["provider"]) # Anthropic
print(model["benchmarks"]["mmlu"]) # 88.7
# Estimate cost for a single call
cost = bg.estimate_cost("gpt-4o", input_tokens=4000, output_tokens=1000)
print(f"Total: ${cost['total_cost']}") # Total: $0.02
API Reference
get_model(slug)
Returns the full data dictionary for a model, including benchmark scores and pricing. Returns None if the slug is not found.
gpt4o = bg.get_model("gpt-4o")
# {"slug", "name", "provider", "context_window", "input_price_per_1m", "output_price_per_1m", "benchmarks"}
compare_models(slug_a, slug_b)
Side-by-side comparison across every tracked benchmark, plus a pricing cost ratio. Useful for building comparison tables or making procurement decisions programmatically.
cmp = bg.compare_models("gpt-4o", "claude-3-5-sonnet")
# Per-benchmark delta
print(cmp["benchmarks"]["humaneval"])
# {"a": 90.2, "b": 92.0, "delta": -1.8, "winner": "claude-3-5-sonnet"}
# Which model is cheaper overall?
print(cmp["pricing"]["cheaper_model"]) # gpt-4o
print(cmp["pricing"]["cost_ratio"]) # 0.694
get_pricing(provider)
Lists every model from a provider with input/output pricing per million tokens and context window size.
for m in bg.get_pricing("anthropic"):
print(f"{m['name']}: ${m['input_price_per_1m']}/M in, ${m['output_price_per_1m']}/M out")
# Claude 3.5 Sonnet: $3.0/M in, $15.0/M out
# Claude 3 Haiku: $0.25/M in, $1.25/M out
list_benchmarks()
Returns metadata for all tracked benchmarks: name, full name, description, and scoring scale.
for b in bg.list_benchmarks():
print(f"{b['name']} ({b['full_name']}): {b['description']}")
estimate_cost(model, input_tokens, output_tokens)
Calculates the USD cost for a single inference call broken down by input and output tokens.
estimate = bg.estimate_cost("deepseek-v3", input_tokens=10_000, output_tokens=2_000)
print(estimate)
# {"model": "deepseek-v3", "input_cost": 0.0027, "output_cost": 0.0022, "total_cost": 0.0049, ...}
list_models() / list_providers()
Convenience helpers that return sorted lists of all available model slugs and provider keys.
print(bg.list_models())
# ["claude-3-5-sonnet", "claude-3-haiku", "command-r-plus", "deepseek-v3", ...]
print(bg.list_providers())
# ["anthropic", "cohere", "deepseek", "google", "meta", "mistral", "openai"]
Data Coverage
The bundled snapshot covers the most-used models from OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, and Cohere. For the full catalogue of 414 models, 55 providers, and 40 benchmarks, visit benchgecko.ai.
Pricing data and benchmark scores are updated with each package release. For real-time pricing, check the pricing page.
Requirements
Python 3.8 or later. No external dependencies.
License
MIT
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 benchgecko-0.1.1.tar.gz.
File metadata
- Download URL: benchgecko-0.1.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adf920b2533a0a7019bb4a30d89648922290fabaefcf1d880e5e2c23d783d6c3
|
|
| MD5 |
2019ffe5aed02fe4aee0c82b936f20b5
|
|
| BLAKE2b-256 |
5463b7816d4528a0252175cf59c0597cdf9a7d47d5789145a9bad509bae4a16d
|
File details
Details for the file benchgecko-0.1.1-py3-none-any.whl.
File metadata
- Download URL: benchgecko-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dc16c0aebcc060c815f841abc677855a6946bc245b476a81d7110fc7125bb59
|
|
| MD5 |
6f1461b5006e86c7ba4bd566ae81a0bb
|
|
| BLAKE2b-256 |
668bf3d4acc36e1e06573522a2859249349b4a663263ff4f87aacd9dba74f264
|