Skip to main content

Retrieve LLM API Prices Fast!

This project provides LLM prices for developers as an API.

Live API

Note: Please use only for testing!!

click here

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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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)

Source distribution for llm-pricing 0.1.3
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

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page