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
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 | |
|---|---|---|---|
| llm_pricing-0.1.3.tar.gz | 20.1 kB | Details |
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
|