NFT Image Generator

Learn how to generate NFT images and upload them to IPFS.

What is NFT Image Generator?

NFT Image Generator is a Github project created by the user Sem. It uses a Python script to generate NFT images and then upload them to IPFS. The original version of this project has been forked and edited to use Filebase instead of the original IPFS pinning provider that was used.

Read below to learn how to generate NFT images and upload them to IPFS.

Prerequisites:

1. Start by cloning the project’s repository:

git clone https://github.com/sem/Filebase-NFT-Image-Generator.git

2. Then install the dependencies:

pip3 install -r requirements.txt.

3. Navigate to the Filebase Access Keys page, then view the IPFS Pinning Service API Endpoint.

Click the drop-down menu for 'Choose Bucket to Generate Token', then choose the IPFS Filebase Bucket you want to use.

4. Then copy the generated Secret Access Token:

5. Open config.json and put the Secret Access Token value in the api_key configuration.

6. Edit the config to match your workflow and make sure there is a sequential number at the beginning of each folder to represent the order of layers.

Make sure your file structure looks something like this:

NFT-Image-Generator/
β”œβ”€ main.py
β”œβ”€ config.json
β”œβ”€ 1 background/
β”‚Β  β”œβ”€ red.png
β”‚Β  β”œβ”€ green.png
β”‚Β  β”œβ”€ blue.png
β”œβ”€ 2 body/
β”‚Β  β”œβ”€ female.png
β”‚Β  β”œβ”€ male.png
β”‚Β  β”œβ”€ zombie.png
β”œβ”€ 3 eyes/
β”‚Β  β”œβ”€ sun_glasses.png
β”‚Β  β”œβ”€ normal_eyes.png
β”‚Β  β”œβ”€ vr_glasses.png

You can get some sample image files to use here.

7. Then, run the script with the command:

run main.py

Last updated