Live Streaming API
The AINative Live Streaming API powers live.ainative.studio — a full-featured live streaming platform with real-time chat, VOD recordings, stream discovery, and audience analytics. You can use these APIs to build your own live streaming application, embed streams in your product, or add creator tooling to an existing platform.
What you can build
- Live streaming apps — create streams, push RTMPS from OBS/ffmpeg, let viewers watch via HLS playback
- Embedded streams — surface live content in your product with follower counts, live status checks, and viewer counts
- Creator dashboards — stream analytics, audience geography, chat activity, and engagement metrics
- Chat integrations — connect to stream chat via WebSocket to read messages, moderate, and send automated messages
- VOD platforms — record live streams as VODs, upload standalone videos, add chapter markers, and build searchable libraries
- Discovery surfaces — trending streams, rising streamers, category browsing, and search
Base URL
https://api.ainative.studio
All streaming endpoints are prefixed with /api/v1/streams unless noted otherwise.
Authentication
Most endpoints require a Bearer token. Include it in every request:
Authorization: Bearer <your_api_key>
Endpoints that expose public data (stream lists, profiles, category browsing) accept unauthenticated requests and return filtered responses.
WebSocket chat uses a ?token= query parameter instead of a header — see Chat.
Available resources
| Resource | Description |
|---|---|
| Streams | Create, manage, and control the stream lifecycle |
| Categories | Browse categories, tags, and stream discovery |
| Chat | WebSocket real-time chat, moderation, and history |
| Analytics | Viewer counts, timelines, geography, and engagement |
| VOD & Video | Recorded streams, chapters, scheduling, and VOD uploads |
| Video API | Standalone video CRUD, search, recommendations, and albums |
Stream lifecycle
A stream moves through the following states:
offline → live → ended
- Create a stream — receive RTMPS ingest URL and stream key
- Push from your broadcasting software (OBS, ffmpeg, etc.)
- Cloudflare Live detects the RTMPS connection and sets status to
live - Viewers access the HLS playback URL
- End the stream via API or stop pushing — status becomes
ended - A VOD recording is automatically attached to the stream
Rate limits
Stream creation is rate-limited to 10 requests per minute per authenticated user to prevent abuse.
Quick start
# Create a stream
curl -X POST https://api.ainative.studio/api/v1/streams/ \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "My First Stream",
"description": "Live coding session",
"category_id": "7a2f3c80-..."
}'
The response includes rtmps_url and stream_key. Configure these in OBS under Settings → Stream → Custom.
Once you start pushing, poll GET /api/v1/streams/id/{stream_id} to confirm the status changes to live.