Welcome to our NFT generation and deployment tutorial! In just two clicks, you can create and deploy your own valuable NFTs. Our tutorial will guide you through the process of generating and deploying unique NFTs quickly and easily.
This tutorial will guide you on how to set up your environment to create an AI-generated NFT collection. You will learn how to configure your .env file, run the backend and frontend servers, and ensure that you have enough faucet funds.
You will need
- A Starton API KEY
- A Wallet with currency of your network
- A DALL-E 2 API KEY
What is DALL-E 2?
DALL-E 2 is an artificial intelligence (AI) model developed by OpenAI. DALL-E 2 is designed to generate images from textual descriptions.
It is capable of generating complex and detailed images. It can create images that are up to 1024x1024 pixels in size, and can generate multiple objects and textures within a single image. DALL-E 2 can also create images that are animated and can be interacted with.
INSTALLING THE PROJECT
info
The project has been set up using a client-side and a server-side so that your API key is not exposed on client. You can also use the server-side to connect a database for metrics.
CREATING STARTON PROJECT
- Clone the project from Starton AI generative NFT collection GitHub.
SETTING UP ENVIRONMENT VARIABLES
Before you start setting up the project, you need to set the environment variables.
- In the
backend
folder of the project, set up an.env
according to.env.example
:
API_HOST=localhost
API_PORT=8000
## Put on the following line your Starton API key (available at https://app.starton.com)
STARTON_API_URL='https://api.starton.io/v3'
STARTON_API_KEY=
## Put on the following line your Signer wallet address
STARTON_SIGNER_WALLET=
## Put on the following line your OpenAI API key (available at https://platform.openai.com/account/api-keys)
OPEN_AI_API_KEY=
- In the
frontend
set up your.env
file according to.env.example
:
NEXT_PUBLIC_BACK_URL=http://localhost:8000
SETTING UP THE SERVER SIDE
Here we would like to enter the data needed to generate and deploy your collection as well as entering your API, so that you can authenticate safely to the API.
- Go to the
backend
folder of the project. - Run the command
yarn install
to install the required dependencies. - Start the server by running the command
yarn dev
.
SETTING UP OUR CLIENT SIDE
On the client side, we will set up all the information of your smart contract to connect your project to Web3Auth.
- Go to the
frontend
folder of the project. - Run the command
yarn install
to install the required dependencies.
RUNNING THE PROJECT
To run your project, you will need to run commands both on server and client side.
- In
server
, run the commandyarn dev
- In
client
, run the commandyarn dev
Visit http://localhost:3000 to test your project.
GENERATING AND DEPLOYING YOUR COLLECTION
Once started, visit http://localhost:3000 to enter the following parameters:
- Enter the receiver wallet of the NFT (where you want to send the NFTs).
- Select the network on which you want to deploy your NFTs. If you are testing, then use the testnet network, and if you are ready to deploy, use the mainnet network (between Polygon, Avalanche, Binance, and Ethereum).
- Choose the number of NFTs that you want to create for your collection.
- Enter the prompt that will generate the images for your NFTs. You can use different prompts to create unique and personalised NFTs.
- Click Generate to display the assets for your NFTs.
- Review the generated assets.
- Once you are satisfied with the images, click Deploy.
Congratulations! You just deployed an NFT collection of images generated by AI.