---
title: "Live Streaming API"
description: "Live streaming platform API — WHIP/WHEP ingest, transcoding, and multi-platform delivery"
canonical: "https://docs.ainative.studio/docs/live-streaming/overview"
last-updated: "2026-10-22T17:48:46.689Z"
---

# Live Streaming API

Source: https://docs.ainative.studio/docs/live-streaming/overview

> Live streaming platform API — WHIP/WHEP ingest, transcoding, and multi-platform delivery

## Live Streaming API

The AINative Live Streaming API powers [live.ainative.studio](https://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:

```http
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](./chat.mdx).

## Available resources

| Resource | Description |
|----------|-------------|
| [Streams](./streams.mdx) | Create, manage, and control the stream lifecycle |
| [Categories](./categories.mdx) | Browse categories, tags, and stream discovery |
| [Chat](./chat.mdx) | WebSocket real-time chat, moderation, and history |
| [Analytics](./analytics.mdx) | Viewer counts, timelines, geography, and engagement |
| [VOD & Video](./vod.mdx) | Recorded streams, chapters, scheduling, and VOD uploads |
| [Video API](./video-api.mdx) | Standalone video CRUD, search, recommendations, and albums |

## Stream lifecycle

A stream moves through the following states:

```
offline  →  live  →  ended
```

1. Create a stream — receive RTMPS ingest URL and stream key
2. Push from your broadcasting software (OBS, ffmpeg, etc.)
3. Cloudflare Live detects the RTMPS connection and sets status to `live`
4. Viewers access the HLS playback URL
5. End the stream via API or stop pushing — status becomes `ended`
6. 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

```bash
## 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`.
