POST
/
transcode
curl --request POST \
  --url https://livepeer.studio/api/transcode \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": {
    "url": "https://s3.amazonaws.com/bucket/file.mp4"
  },
  "storage": {
    "type": "s3",
    "endpoint": "https://gateway.storjshare.io",
    "bucket": "outputbucket",
    "credentials": {
      "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
      "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
    }
  },
  "outputs": {
    "hls": {
      "path": "/samplevideo/hls"
    },
    "mp4": {
      "path": "/samplevideo/mp4"
    },
    "fmp4": {
      "path": "/samplevideo/fmp4"
    }
  },
  "profiles": [
    {
      "width": 129,
      "name": "720p",
      "height": 129,
      "bitrate": 401,
      "quality": 22,
      "fps": 1,
      "fpsDen": 2,
      "gop": "<string>",
      "profile": "H264Baseline",
      "encoder": "h264"
    }
  ],
  "targetSegmentSizeSecs": 123,
  "creatorId": {
    "type": "unverified",
    "value": "<string>"
  },
  "c2pa": true
}'
{
  "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
  "type": "upload",
  "createdAt": 1587667174725,
  "scheduledAt": 1587667174725,
  "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
  "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
  "requesterId": "<string>",
  "params": {
    "upload": {
      "url": "https://cdn.livepeer.com/ABC123/filename.mp4",
      "encryption": {},
      "c2pa": true,
      "profiles": [
        {
          "width": 129,
          "name": "720p",
          "height": 129,
          "bitrate": 401,
          "quality": 22,
          "fps": 1,
          "fpsDen": 2,
          "gop": "<string>",
          "profile": "H264Baseline",
          "encoder": "H.264"
        }
      ],
      "targetSegmentSizeSecs": 123
    },
    "export": {
      "custom": {
        "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB",
        "method": "<string>",
        "headers": {}
      }
    },
    "exportData": {
      "content": {},
      "ipfs": {
        "pinata": {},
        "nftMetadataTemplate": "file",
        "nftMetadata": {}
      },
      "type": "<string>",
      "id": "<string>"
    },
    "transcode-file": {
      "input": {
        "url": "https://cdn.livepeer.com/ABC123/filename.mp4"
      },
      "storage": {
        "url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"
      },
      "outputs": {
        "hls": {
          "path": "/samplevideo/hls"
        },
        "mp4": {
          "path": "/samplevideo/mp4"
        }
      },
      "profiles": [
        {
          "width": 129,
          "name": "720p",
          "height": 129,
          "bitrate": 401,
          "quality": 22,
          "fps": 1,
          "fpsDen": 2,
          "gop": "<string>",
          "profile": "H264Baseline",
          "encoder": "H.264"
        }
      ],
      "targetSegmentSizeSecs": 123,
      "creatorId": {
        "type": "unverified",
        "value": "<string>"
      },
      "c2pa": true
    },
    "clip": {
      "url": "<string>",
      "clipStrategy": {
        "startTime": 123,
        "endTime": 123,
        "playbackId": "<string>"
      },
      "catalystPipelineStrategy": "catalyst",
      "sessionId": "<string>",
      "inputId": "<string>"
    }
  },
  "status": {
    "phase": "pending",
    "updatedAt": 1587667174725,
    "progress": 123,
    "errorMessage": "<string>",
    "retries": 123
  },
  "output": {
    "upload": {
      "assetSpec": {
        "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
        "type": "video",
        "playbackId": "eaw4nk06ts2d0mzb",
        "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8",
        "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video",
        "playbackPolicy": {
          "type": "public",
          "webhookId": "<string>",
          "webhookContext": {},
          "refreshInterval": 123
        },
        "source": {
          "type": "url",
          "url": "<string>",
          "gatewayUrl": "<string>",
          "encryption": {}
        },
        "creatorId": {
          "type": "unverified",
          "value": "<string>"
        },
        "storage": {
          "ipfs": {
            "spec": {
              "nftMetadataTemplate": "file",
              "nftMetadata": {}
            },
            "nftMetadata": {
              "cid": "<string>",
              "url": "<string>",
              "gatewayUrl": "<string>"
            },
            "updatedAt": 1587667174725,
            "cid": "<string>",
            "url": "<string>",
            "gatewayUrl": "<string>"
          },
          "status": {
            "phase": "waiting",
            "progress": 123,
            "errorMessage": "<string>",
            "tasks": {
              "pending": "<string>",
              "last": "<string>",
              "failed": "<string>"
            }
          }
        },
        "status": {
          "phase": "uploading",
          "updatedAt": 1587667174725,
          "progress": 123,
          "errorMessage": "<string>"
        },
        "name": "filename.mp4",
        "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
        "createdAt": 1587667174725,
        "createdByTokenName": "<string>",
        "size": 84934509,
        "hash": [
          {
            "hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57",
            "algorithm": "sha256"
          }
        ],
        "videoSpec": {
          "format": "mp4",
          "duration": 23.8328,
          "bitrate": 1000000,
          "tracks": [
            {
              "type": "video",
              "codec": "aac",
              "startTime": 23.8238,
              "duration": 23.8238,
              "bitrate": 1000000,
              "width": 1920,
              "height": 1080,
              "pixelFormat": "yuv420p",
              "fps": 30,
              "channels": 2,
              "sampleRate": 44100,
              "bitDepth": 16
            }
          ]
        }
      }
    },
    "export": {
      "ipfs": {
        "videoFileCid": "<string>",
        "videoFileUrl": "<string>",
        "videoFileGatewayUrl": "<string>",
        "nftMetadataCid": "<string>",
        "nftMetadataUrl": "<string>",
        "nftMetadataGatewayUrl": "<string>"
      }
    },
    "exportData": {
      "ipfs": {
        "cid": "<string>"
      }
    }
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
input
object
required

URL input video

storage
object
required

Storage for the output files

outputs
object
required

Output formats

profiles
object[]
targetSegmentSizeSecs
number

How many seconds the duration of each output segment should be

creatorId
c2pa
boolean

Decides if the output video should include C2PA signature

Response

200 - application/json
id
string

Task ID

type
enum<string>

Type of the task

Available options:
upload,
export,
export-data,
transcode-file,
clip
createdAt
number

Timestamp (in milliseconds) at which task was created

scheduledAt
number

Timestamp (in milliseconds) at which the task was scheduled for execution (e.g. after file upload finished).

inputAssetId
string

ID of the input asset

outputAssetId
string

ID of the output asset

requesterId
string

ID of the requester hash(IP + SALT + PlaybackId)

params
object

Parameters of the task

status
object

Status of the task

output
object

Output of the task