API to live stream to twitch?

I understand that it’s possible to live stream to Twitch via its API since so many softwares do it. However, I’m not able to find how to actually go about it.

Which API exactly am I supposed to use?

Thanks,
Umair

Get the address of an ingest server from ingests endpoint and then use RTMP to contact and stream to that address, replacing {stream_key} with the channel’s stream key.