NextGen Live API Sample: Create a Live Job

Create a simple NextGen Live channel with three video renditions using the Live API v2.

Introduction

This sample sends a POST request to create a live channel. Replace ACCESS_TOKEN, ACCOUNT_ID, and region as needed. See Quick Start: NextGen Live API for OAuth setup.

Request

curl -X POST \
  "https://api.live.brightcove.com/v2/accounts/ACCOUNT_ID/jobs" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "API sample channel",
    "type": "channel",
    "region": "us-west-2",
    "input": { "protocol": "rtmp" },
    "outputs": {
      "video": [
        { "label": "1080p", "height": 1080, "width": 1920, "bitrate": 4500000, "codec": "h264" },
        { "label": "720p", "height": 720, "width": 1280, "bitrate": 3000000, "codec": "h264" },
        { "label": "480p", "height": 480, "width": 854, "bitrate": 1500000, "codec": "h264" }
      ],
      "audio": [
        { "label": "default", "codec": "aac", "bitrate": 128000 }
      ]
    }
  }'

The response includes the job id, ingest URL, and stream key. Use these values in your encoder.