Livepush Developers

Videos

Start a multipart upload

POST https://octopus.livepush.io/streams/{stream_id}/videos/uploadurl/multipart

Base URL https://octopus.livepush.io — Core Streams & Media APIs

Opens a multipart upload session for a large video and returns the uploadId and object Key used by the remaining multipart calls.

Check isMultipartUploadDisabled on the storage specs first — when it is true this endpoint is closed to the account.

Requires a token with the streams.videos.write scope.

Authorization

Send a valid access token in the Authorization header.

  • bearerAuth — Bearer token (JWT)
headers.txt
Authorization: Bearer YOUR_API_TOKEN

Try it

POST https://octopus.livepush.io/streams/{stream_id}/videos/uploadurl/multipart — This call changes live data on your account.

Parameters

Path parameters

  • stream_id string required
    Unique identifier of the stream.
    example: st_xxxxxxxxxxxxx

Request body

application/json required

  • type string required
    MIME type of the file.
  • size integer required
    File size in bytes.
  • originalFilename string required
  • zone string required
    Storage zone to upload into.
  • partNumber integer
    Only used by the signed single-part variant.
Example request body response.json
{
  "type": "video/mp4",
  "size": 734003200,
  "originalFilename": "service-12-jan.mp4",
  "zone": "eu-central",
  "partNumber": 0
}

Code samples

request.sh
curl -X POST 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl/multipart' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "video/mp4",
    "size": 734003200,
    "originalFilename": "service-12-jan.mp4",
    "zone": "eu-central",
    "partNumber": 0
  }'
const response = await fetch('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl/multipart', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "type": "video/mp4",
    "size": 734003200,
    "originalFilename": "service-12-jan.mp4",
    "zone": "eu-central",
    "partNumber": 0
  }),
});

if (!response.ok) {
  throw new Error(`Livepush API error ${response.status}`);
}

const data = await response.json();
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
    "type": "video/mp4",
    "size": 734003200,
    "originalFilename": "service-12-jan.mp4",
    "zone": "eu-central",
    "partNumber": 0
}

response = requests.post('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl/multipart', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()

Responses

Start a multipart upload.

application/json

  • id string
  • Key string
  • uploadId string
    Storage-side session identifier.
  • uploadUrl string
    Mirrors uploadId — kept for symmetry with the single-part response.
  • uploadType string
    multipart
  • uploadCredentials VideoUploadCredentials
    Vendor-specific credentials the client needs to perform the upload. The shape depends on uploadType: multipart uploads receive pool and chunking parameters, formdata uploads receive the signed form fields to post alongside the file, and direct uploads receive nothing — everything is carried in uploadUrl.
    • bucketName string
    • region string
    • poolId string
      Identity pool used to authorise the multipart upload.
    • concurrency integer
      How many parts the client should upload in parallel.
    • chunkSize integer
      Part size in bytes.
    • keyPrefix string
    • useAccelerateEndpoint boolean
  • zone string
Example 200 response response.json
{
  "id": "vd_xxxxxxxxxxxx",
  "Key": "string",
  "uploadId": "string",
  "uploadUrl": "string",
  "uploadType": "multipart",
  "uploadCredentials": {
    "bucketName": "string",
    "region": "eu-west-1",
    "poolId": "string",
    "concurrency": 4,
    "chunkSize": 8388608,
    "keyPrefix": "string",
    "useAccelerateEndpoint": false
  },
  "zone": "zn_35hk0gxy_pr"
}

No response body.

Not found for this account.