How to easily build a Stable Diffusion web app + The future of the web

James Pog
2 min readSep 18, 2022

--

Stable diffusion, and similar machine learning models are opening doors for indie developers to build revolutionary new software products.

Here’s a photoshop plugin that uses Stable Diffusion to help create beautiful renderings:
https://twitter.com/cantrell/status/1567898557763538947?s=20&t=87vYmOezHAasHmLXP1duHQ

Recently I built a Figma plugin that uses Stable Diffusion to generate beautiful high quality images from simple sketches.

Setting up the model and getting it working in the cloud across several load balanced instances was no easy feat, it took several weeks. This is not to mention the waiting time and hassle to go through to convince the cloud providers you deserve a GPU instance ( I literally had to have a physical meeting with a Google cloud rep where he grills you on why you need a GPU instance).

I don’t want anyone to have to go through this, so I setup an API for devs to painlessly build amazing stable diffusion applications.

Here’s how to access stable diffusion generated images in 2 steps:

  1. The API is currently only available on rapid API, create an account and subscribe to get the API key: https://rapidapi.com/jamesryebread/api/mage2/details
  2. Copy the code example from https://rapidapi.com/jamesryebread/api/mage2 for whatever language you are using. Change the prompt to whatever you like!

If you have any questions or would like to talk about a custom plan (for access to img2img generation options) feel free to reach out on twitter! :)

--

--

James Pog

Ex-Uber, Software Engineer at Amazon, I level up devs by 100x. Building AI startups. Follow me on twitter for more: https://twitter.com/jamescodez