Metadata-Version: 2.4
Name: llm-pricing
Version: 0.1.3
Summary: A library for scraping and managing LLM pricing information
Home-page: https://github.com/fswair/llm-pricing
Author: fswair
Author-email: contact@tomris.dev
Project-URL: Bug Reports, https://github.com/fswair/llm-pricing/issues
Project-URL: Source, https://github.com/fswair/llm-pricing
Keywords: llm pricing,llm api,llm api cost
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: brotli
Requires-Dist: uvicorn
Requires-Dist: fastapi
Requires-Dist: aiohttp
Requires-Dist: aiocache
Requires-Dist: pydantic
Requires-Dist: user-agent
Requires-Dist: cache-fastapi
Requires-Dist: python-dotenv
Requires-Dist: beautifulsoup4
Requires-Dist: aiohttp[brotli]
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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](https://llm-costs.tomris.dev)

## Anthropic

```py
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

```sh
make serve
```

## License

This project is licensed under the MIT License - see the [LICENSE](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
