There's a CLI [1], LLM API [2], and REST API [3].
[1]: https://github.com/home-assistant-ecosystem/home-assistant-c...
[2]: https://developers.home-assistant.io/docs/core/llm/
[3]: https://developers.home-assistant.io/docs/api/rest/