Generate Ingress
Creates a new RTMP ingress endpoint for streaming.
Endpoint
POST /api/ingress/generateRequest Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
x-api-key | Yes | Your API key |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
roomName | string | Yes | Name of the room for the stream |
participantIdentity | string | No | Unique identifier for the streamer (auto-generated if not provided) |
participantName | string | No | Display name for the streamer (defaults to "RTMP Streamer") |
metadata | object | No | Custom metadata to attach to the participant |
enableTranscoding | boolean | No | Enable transcoding (default: true) |
Example Request
curl -X POST https://live-api.block8910.com/api/ingress/generate \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"roomName": "my-room",
"participantIdentity": "streamer-1",
"participantName": "My Stream",
"metadata": {
"source": "api",
"quality": "1080p"
},
"enableTranscoding": true
}'Response
{
"success": true,
"data": {
"ingressId": "IN_xxxxxxxxxxxxxx",
"url": "rtmp://rtmp.block8910.com:1935/x",
"streamKey": "aAXevUYwfj9K",
"rtmpUrl": "rtmp://rtmp.block8910.com:1935/x/aAXevUYwfj9K",
"roomName": "my-room",
"participantIdentity": "streamer-1",
"participantName": "My Stream",
"wsUrl": "wss://live.block8910.com"
}
}Response Fields
| Field | Description |
|---|---|
ingressId | Unique identifier for the ingress (use for deletion) |
url | Base RTMP server URL |
streamKey | Stream key for authentication |
rtmpUrl | Full RTMP URL for streaming (url + streamKey) |
roomName | Room name for viewers to join |
participantIdentity | Unique identifier for the streamer |
participantName | Display name of the streamer |
wsUrl | WebSocket URL for viewers to connect |
Using the RTMP URL
Stream to the rtmpUrl using FFmpeg or OBS:
ffmpeg -re -i video.mp4 -c:v libx264 -f flv "rtmp://rtmp.block8910.com:1935/x/aAXevUYwfj9K"