Retrieve LLM API Prices Fast!
This project provides LLM prices for developers as an API.
Live API
Note: Please use only for testing!!
Anthropic
from llm_pricing import AnthropicScraper
async def main():
async with ClientSession() as session:
scraper = AnthropicScraper(session)
llm_tools = await scraper.get_tools()
latest_models = await scraper.get_latest_models()
legacy_models = await scraper.get_legacy_models()
# overall contains tools, legacy and latest models
# with using llm_pricing.AnthropicLLMCosts
overall = await scraper.pricing_overall()
if __name__ == '__main__':
import asyncio
asyncio.run(main())
Serve API
make serve
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Metadata
Release files for llm-pricing 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_pricing-0.1.3.tar.gz | 20.1 kB | Without provenance | Details for llm_pricing-0.1.3.tar.gz |
Release files / llm_pricing-0.1.3.tar.gz
| Download URL | llm_pricing-0.1.3.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebd5c1cbe4841822c0fd5c8c7fb68eef12dfc20a1a01b77cdfe99f4764b7553a
|
|
BLAKE2b-256 checksum How to use checksums |
0ce52d2b0340cce217f05230968aca53fd51c412f30d444cc8206cc371e868b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Security for llm-pricing 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.