POST
/
asset
/
upload
/
url
curl --request POST \
  --url https://livepeer.studio/api/asset/upload/url \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  		"name": "my first asset",
		"url": "https://example.com/my-first-asset.mp4"
	}'
{
  "asset": {
    "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
    "type": "video",
    "playbackId": "eaw4nk06ts2d0mzb",
    "userId": "66E2161C-7670-4D05-B71D-DA2D6979556F",
    "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8",
    "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video",
    "playbackPolicy": {
      "type": "webhook",
      "webhookId": "1bde4o2i6xycudoy",
      "webhookContext": {
        "streamerId": "my-custom-id"
      },
      "refreshInterval": 600
    },
    "source": {
      "type": "url",
      "url": "<string>",
      "gatewayUrl": "<string>",
      "encryption": {}
    },
    "creatorId": {
      "type": "unverified",
      "value": "user123"
    },
    "storage": {
      "ipfs": {
        "spec": {
          "nftMetadataTemplate": "file",
          "nftMetadata": {}
        },
        "nftMetadata": {
          "cid": "<string>",
          "url": "<string>",
          "gatewayUrl": "<string>"
        },
        "updatedAt": 1587667174725,
        "cid": "<string>",
        "url": "<string>",
        "gatewayUrl": "<string>"
      },
      "status": {
        "phase": "ready",
        "progress": 0.5,
        "errorMessage": "Failed to update storage",
        "tasks": {
          "pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
          "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
          "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
        }
      }
    },
    "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
        }
      ]
    }
  },
  "task": {
    "id": "34d7618e-fd42-4798-acf5-19504616a11e"
  }
}

Authorizations

Authorization
string
headerrequired

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

Body

application/json
name
string
required

The name of the asset. This is not necessarily the filename - it can be a custom name or title.

staticMp4
boolean

Whether to generate MP4s for the asset.

playbackPolicy
object

Whether the playback policy for a asset or stream is public or signed

creatorId
storage
object
url
string
required

URL where the asset contents can be retrieved, e.g. https://s3.amazonaws.com/my-bucket/path/filename.mp4. For an IPFS source, this should be similar to: ipfs://{CID}. For an Arweave source: ar://{CID}.

encryption
object
c2pa
boolean

Decides if the output video should include C2PA signature

profiles
object[]
targetSegmentSizeSecs
number

How many seconds the duration of each output segment should be

Response

200 - application/json
asset
object
required
task
object
required