# 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