Export an Asset to IPFS
Export a video Asset
from Livepeer to IPFS on the
POST /api/asset/$ASSET_ID/export
endpoint. This request spawns an export
task.
curl --location --request POST 'https://livepeer.com/api/asset/$ASSET_ID/export' \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"ipfs": {}
}'
parameter | type | description |
---|---|---|
ipfs | object | Defined properties to export the `Asset` on IPFS |
ipfs.pinata | object | Custom credentials for the Piñata service. Must have either a JWT or an API key and an API secret. (Optional) |
ipfs.pinata.jwt | string | Will be added to the `Authorization` header as a Bearer token. |
ipfs.pinata.apiKey | string | Will be added to the `pinata_api_key` header. |
ipfs.pinata.apiSecret | string | Will be added to the `pinata_secret_api_key` header. |
ipfs.nftMetadata | object | Additional data to add to the NFT metadata also exported to IPFS. Will be deep merged with the default metadata regularly exported. |
custom | object | Define properties to export the `Asset` on a custom URL. (Optional) |
custom.url | string | URL where to export the `Asset` |
custom.method | string | Alternative method to use on the export request. Will use PUT if not specified (Optional) |
custom.headers | object | Additional headers to add to the export request (Optional) |
You can then check the result of the export through the tasks API, by querying for the specific task returned as a response.