Inspiration
The app's name antwerp was inspired by the legendary Flemish artists from 16th and 17th century Belgium. The goal of the app is to make a simple, easy-to-use tool that mints unique NFTs on the NEAR Protocol using images generated from the most advanced AI system around today, DALL-E 2. With antwerp, all you need is a short text description of any wild idea to create a truly unique NFT on NEAR.
What it does
antwerp is currently set up to work on the NEAR Testnet. After logging in with a NEAR testnet account, simply provide it with a short but detailed description of any idea. For example:
"an astronaut riding a blue horse"
"an oil painting of a dog wearing a red French painter's hat"
"a children's crayon drawing of an orangutan on a beach"
You can command the app to produce art in virtually any style imaginable, whether you desire a realistic photo, a pencil sketch, or even an oil painting.
How we built it
antwerp was written in Next.js, a React framework. It uses bleeding edge technology, including DALL-E 2's API (which was just released less than 2 months ago) along with web3.storage API for uploading this artwork to the decentralized IPFS network. It also stores a copy of the image to an AWS S3 bucket for reference.
The smart contract it uses was written in Rust and deployed to the NEAR Testnet. It uses the NEAR JS API to interact with the contract. The contract has been deployed to antwerp.contrabandinteractive.testnet
Challenges we ran into
I spent a full two days troubleshooting an issue I ran into while trying to store the NFT images. In my local dev environment, I saved each generated image to a local folder which allowed for the app to more easily work with the web3.storage API. When I uploaded the app to production, due to the hosting environment (Vercel) not allowing me to write to a folder, I had to come up with another solution to temporarily store the images.
The final solution I came across works in the following manner: the app queries the DALL-E 2 API to generate an image -> the buffer data of this image is then downloaded -> buffer data is used to create a new object on AWS S3 storage -> the object is retrieved and used to create an image in a special '/tmp' directory, using ephemeral storage. It is then instantly pinned to IPFS for use in the final NFT metadata.
Accomplishments that we're proud of
This is a simple, but potent proof-of-concept that lays the groundwork for a new generation of NFT marketplaces and tools. The app creates a bridge to connect AI generated art to the NEAR Protocol.
The technology behind the NEAR Protocol is solid, and I believe that even though at the time of this app's development that the web3/crypto world is under a lot of scrutiny, right now is the perfect time to continue to push the boundaries of what is possible using the blockchain.
What we learned
I learned a lot more about NEAR smart contracts and how to interact with them, along with expanding my knowledge about several APIs including AWS S3, web3.storage and OpenAI's DALL-E API.
What's next for antwerp - Minting AI-generated Artwork NFTs
I'd like to expand on this concept and create a marketplace of NFTs featuring AI-generated artwork. I have yet to see an AI artwork NFT project on NEAR, so I believe there is a huge opportunity here. I'd also like to leverage other AI technologies for trading other assets on NEAR.
Built With
- nextjs
- rust


Log in or sign up for Devpost to join the conversation.