Protect DALL·E AI-Generated Images
Learn how to license and protect DALL·E AI-Generated images on Story.
In this tutorial, you will learn how to license and protect DALL·E 2 AI-Generated images by registering it on Story.
The Explanation
Let’s say you generate an image using AI. Without adding a proper license to your image, others could use it freely. In this tutorial, you will learn how to add a license to your DALL·E 2 AI-Generated image so that if others want to use it, they must properly license it from you.
In order to register that IP on Story, you first need to mint an NFT to represent that IP, and then register that NFT on Story, turning it into an IP Asset.
0. Before you Start
There are a few steps you have to complete before you can start the tutorial.
- You will need to install Node.js and npm. If you’ve coded before, you likely have these.
- Add your Story Network Testnet wallet’s private key to
.env
file:
- Go to Pinata and create a new API key. Add the JWT to your
.env
file:
- Go to OpenAI and create a new API key. Add the new key to your
.env
file:
OpenAI Credits
In order to generate an image, you’ll need OpenAI credits. If you just created an account, you will probably have a free trial that will give you a few credits to start with.
- Add your preferred RPC URL to your
.env
file. You can just use the public default one we provide:
- Install the dependencies:
1. Generate an Image
In a main.ts
file, add the following code to generate an image:
2. Set up your Story Config
In a utils.ts
file, add the following code to set up your Story Config:
Associated docs: TypeScript SDK Setup
3. Set up your IP Metadata
View the IPA Metadata Standard and construct your metadata for your IP. Back in the main.ts
file, properly format your metadata as shown below:
4. Set up your NFT Metadata
The NFT Metadata follows the ERC-721 Metadata Standard.
5. Upload & Register IP
Now that we have all of our metadata set up, you can easily complete this tutorial by going to Register an IP Asset and completing steps 3 (Upload your IP and NFT Metadata to IPFS) & 4 (Register an NFT as an IP Asset).
Once you have done that, you should see a console log with a link to our IP-explorer that shows your registered AI generated image.