Stream API adds NFT minting and ownership transfer

Cloudflare Stream has introduced an API that can associate an ERC-721 token with any video, letting creators claim ownership of their work on the Ethereum blockchain. The feature maps an NFT token ID and contract address to a video, and that mapping is immutable once set.

Before making the call, be sure the NFT belongs to you: the token owner can later claim the linked video and either delete it or transfer it to their own Cloudflare Stream account.

curl -X POST -H "Authorization: Bearer $AUTH_TOKEN" --data '{"contract":"0x57f1887a8bf19b14fc0d912b9b2acc9af147ea85","token":"5"}' https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/stream/$VIDEO_ID/nft

Stream does not mint NFTs itself. To create one, you can use a market such as OpenSea or Foundation, or command-line tools like Minty. Minting an NFT only records metadata on the blockchain; the platform does not host the underlying video. After creating the token, take the returned contract and token ID and attach them to your Stream video with the API call above.

Since NFT metadata URLs generally point at long-term storage, consider storing a copy of the original video on a decentralized system such as IPFS or Filecoin and using that link in the token metadata. Stream can hold the high-quality or longer version that would be too expensive to distribute via decentralized storage, with support for captions, codecs on all mainstream devices and adaptive bitrate streaming.

The ownership-transfer model

Linking an NFT to a video hands the token owner full administrator rights. A new owner of the token can prove ownership, claim the video through the API, then edit settings, restrict views, add captions or move it to their own account. The original uploader cannot revoke that control.

Claiming a video requires signing a fixed message with the wallet that owns the NFT:

"I claim ownership of NFT #$TOKEN_ID under contract $CONTRACT and this message expires at $EXPIRY_TIME"

$EXPIRY_TIME must be an RFC3339 timestamp in the near future. An example signed message is viewable on Etherscan.

curl -X POST -H "Authorization: Bearer $AUTH_TOKEN" --data '{"expiry":"2021-12-005T00:00:00Z","signature":"0x..."}' https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/stream/claim/$VIDEO_ID

On the back end, Stream stores the token ID and contract pair and checks ERC-721 compatibility via Cloudflare’s Ethereum Gateway. The integration is intentionally minimal: the video database does not query on-chain events, but ownership claims and transfers flow through the standard API.

Most NFT marketplaces still display images or short animations; long-form video is rare, in part because IPFS and similar networks cannot reliably stream high-bitrate content across devices and connection speeds. NFT metadata also commonly includes accessibility requirements that are non-trivial to deliver from decentralized storage.

By pairing the NFT with Stream, creators can build business models beyond a single sale, such as fractional ownership with voting rights, crowdfunded content or outright trading. Platforms in the NFT space have welcomed the move as a way to scale video NFTs. Dapper Labs, which created the ERC-721 standard, notes the feature eases adoption of blockchain for creators, while OpenSea describes it as a way to produce and distribute high-quality video NFTs at scale.

Player linkage

When a Stream video is associated with an NFT, the player will display a link to the contract and token governing that video. The public player output therefore acts as a visual confirmation of the ownership record stored on-chain.