X rebuilds its Livestream API so apps can run the whole broadcast
X has rebuilt the Livestream API. Apps can now go live on X, schedule broadcasts, and read and moderate chat. The API is available only to customers on the Enterprise plan.
X has announced that its Livestream API has been rebuilt from the ground up. According to the X Developers account, the entire broadcast lifecycle can now be run through the API: going live, scheduling broadcasts, running and moderating chat, and receiving live events for alerts and overlays. The API is available now.
What the Livestream API is
The Livestream API is a programming interface that lets streaming software, media companies and other apps start and manage live video on X from their own systems. The video is sent to X from an encoder such as OBS Studio or ffmpeg, while the API controls going live, the title, the chat and ending the broadcast.
What it can do
- Stream sources: The ingest address and stream key that the encoder pushes to are created once and can be reused for every later broadcast.
- Broadcast lifecycle: Create a broadcast, go live, monitor viewer counts and state, and end it.
- Scheduled broadcasts: One-time or recurring broadcasts can be scheduled in advance. At the scheduled time they can start automatically or wait for a go-live request.
- Live chat: Chat can be read through the X Activity API; apps can post messages, remove messages and mute users. Chat history can be pulled after the broadcast ends.
How to use it
The flow in X's docs: get the recommended region, create a stream source, connect the encoder, create and publish the broadcast, then end it. The app needs broadcast read and write permissions, and the broadcasting account must be allowed to go live. Protected accounts cannot create broadcasts.
Things to keep in mind
- The API is Enterprise-only. According to X's docs, using the Livestream API requires an Enterprise agreement with X. Access is requested through X's form and enabled after review. It is not part of the standard API packages used by individual developers and small teams.
- X says it will announce official broadcast partners soon, so it is not yet clear which streaming apps will use the API.
Sources: X docs: Livestream API, X docs: Getting Started, X docs: Typical Workflow, X Developers announcement.