You don't need an api for that. You can do that with a 30 year old CRT if you wanted. Copy IR signals from remote. Put IR blaster in front of IR receiver. Make whatever tool you want to control the IR blaster. Done.
Yes. I could do that. I could also hook something up to the debug serial port and reverse engineer that, or use HDMI-CEC, or make a tiny robot that pushes the buttons on the back of the TV. I'm using the API though, because I already have a Home Assistant server on my network and that can communicate with the API without me having to faff about making tiny robots.