A library for scraping and managing LLM pricing information
Project description
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
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
llm_pricing-0.1.3.tar.gz
(20.1 kB
view details)
File details
Details for the file llm_pricing-0.1.3.tar.gz.
File metadata
- Download URL: llm_pricing-0.1.3.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd5c1cbe4841822c0fd5c8c7fb68eef12dfc20a1a01b77cdfe99f4764b7553a
|
|
| MD5 |
a4f165b33d59f556e201d806e68aca91
|
|
| BLAKE2b-256 |
0ce52d2b0340cce217f05230968aca53fd51c412f30d444cc8206cc371e868b1
|