Discover and explore top open-source AI tools and projects—updated daily.
pydanticLLM inference API cost estimation tool
Top 94.9% on SourcePulse
Summary
This project provides a tool for calculating prices associated with calling Large Language Model (LLM) inference APIs. It targets developers and researchers needing to estimate and compare LLM operational costs across numerous providers, offering a unified data source for pricing information.
How It Works
The system employs advanced logic for matching model and provider identifiers, ensuring accurate price retrieval. It supports historical price data, variable daily rates (including off-peak pricing), and tiered pricing structures for models with large context windows. Price data is managed in JSON format and is accessible via downloadable files, alongside Python and JavaScript/TypeScript packages and CLIs.
Quick Start & Requirements
Installation and usage instructions for the Python and JavaScript/TypeScript packages are detailed in their respective README files. Price data is directly available for download from the prices/ directory, including data.json and data_slim.json variants. No specific non-default prerequisites are listed in this README.
Highlighted Details
Maintenance & Community
Contributions are welcomed, particularly from model providers to serve pricing information directly. The project leverages and acknowledges data from sources like Helicone, Open Router, LiteLLM, and Simon Willison's llm-prices. Instructions for contributing price data are in prices/README.md.
Licensing & Compatibility
The specific license is not detailed in this README. Users are directed to read the LICENSE file for development, hosting, and distribution terms. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The project provides indicative price estimates, acknowledging that 100% accuracy is not guaranteed due to the inconsistent availability of exact pricing information from API providers. Users are advised that this is a best-effort calculation and not a guarantee against unexpected billing.
3 days ago
Inactive
AgentOps-AI