In this tutorial, you will learn how to license and protect DALL·E 2 AI-Generated images by registering it on Story.Documentation Index
Fetch the complete documentation index at: https://docs.story.foundation/llms.txt
Use this file to discover all available pages before exploring further.
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
.envfile:
.env
- Go to Pinata and create a new API key. Add the JWT to your
.envfile:
.env
- Go to OpenAI and create a new API key. Add the new key to your
.envfile:
.env
- Add your preferred RPC URL to your
.envfile. You can just use the public default one we provide:
.env
- Install the dependencies:
Terminal
1. Generate an Image
In amain.ts file, add the following code to generate an image:
main.ts
2. Set up your Story Config
In autils.ts file, add the following code to set up your Story Config:
Associated docs: TypeScript SDK Setup
utils.ts
3. Set up your IP Metadata
View the IPA Metadata Standard and construct your metadata for your IP. Back in themain.ts file, properly format your metadata as shown below:
main.ts
4. Set up your NFT Metadata
The NFT Metadata follows the ERC-721 Metadata Standard.main.ts
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.6. Done!
Learn More
Explore more tutorials in our documentation

