Creating a Living Generative Art NFT Project With JavaScript, Google Cloud, Instagram, and OpenSea

Intro / Context

I’ve been interested in code and technology most of my life. And I’ve been interested in art and design for much of it too. I was aware of there being an interplay between them (algorithmic art, creative coding, etc.) but had never really dabbled much in it.

Profile Pic Collection Generative Art

Bored Ape Yacht Club
Cool Cats

“Museum-Grade” Generative Art

The other kind of generative NFT art looks more like this:

Fidenza series, by Tyler Hobbs
Unigrids #162 by Zeblocks


The overarching theme of the project is “what if I took the human element out of the process of creating and posting the art pieces”. Of course, this isn’t art created purely by a computer, since I have set up the parameters in advance. However, it is something that, once started, will run like a perpetual motion machine until the project concludes, pivots, or is taken down for maintenance.

  1. The circles will be cut off at the corners and sides of the image, this is so that when posted in an Instagram feed, they connect create a sort of “continuous canvas”.
  2. The background as well as the color of each circle will be randomly chosen based on the HSB (also known as HSV) color model, with three random values from 0 to 255.
  3. This creates 256^(17 * 3), or 256⁴⁹ possibilities, which means each piece is virtually unique.
  4. The script will run daily on a cloud server, generate that day’s piece of art, and automatically upload it to Instagram via API. The piece is also uploaded to Twitter.
  5. I take the most-engaged (on Instagram) piece of the previous week, and upload it to OpenSea as an NFT, which can then be minted by any buyers on the Ethereum blockchain, where they will thereafter live forever.

Technical Background

The high-level stack involved is:

  • A Node port of p5.js — the generative art library used
  • Google Cloud (Compute Engine, Storage, Logging) — for hosting the code and having an always-on VM that will run this for me on a daily basis
  • Instagram API — so I can automatically post the pieces and comment the hashtags
  • GitHub — for version control
Series 40542
  1. That piece is saved to the local filesystem as a jpg.
  2. That saved file is uploaded to a public Google Cloud Storage bucket.
  3. It calls the Instagram API with the public URL to the piece’s saved file.
  4. The Instagram API creates a “media container” and returns its ID.
  5. It calls the Instagram API again to publish said container using its ID, now we have the post’s ID returned.
  6. It calls the Instagram API once more to comment hashtags on the post that was just created (I think this looks cleaner).

Future Plans / Roadmap

I’ve kicked off the project to run automatically starting on September 19th, 2021. You can follow it in a number of places:


Overall, this is an experiment. As mentioned earlier, the theme of the project is taking the human element out of the creative and posting process, and creating a sort of “living art project” that will tick away without any human intervention (unless I need to restart a server or re-authenticate an API key).

Project Links:

Personal Links:

NYC. Tech, Blockchain, Digital Art, Life.