Building AI app

With Meteron you get core APIs that are required to build an app that can work at scale.

News single

As an example we will be using app which source code is available on GitHub here It is based on the example. The main difference is that by using Meteron we greatly simplify the stack. No need for Postgres, Prisma, Redis, etc. We also add a few features like prioritization and ordering.

You can focus on things that matter here - choosing the AI model, prompt and the UI design.

What is needed for an AI app?

Typical AI app consists of these components:

  • Fronted - is what we show to the users (HTML, CSS, javascript).
  • Backend - where your business logic resides.
  • AI model - generates text, images, etc.

We will look into the roomfix app and see how it is built so you can build yours! 🥳🥳🥳


Frontend in a typical Next.js app is a combination of HTML, CSS and javascript. In this particular example CSS is mostly TailwindCSS so we can ignore it. Pages can be found here:


Backend ins Next.js apps is really convenient. You can find the image generation call here If you wish to use a different model, just modify the payload and the model version hash.

Meteron here expects the X-Model and X-User headers to enforce rate limits and to make sure that you are using the right model.

AI model

For image generation we use a ControlNet model, hosted on They have came up with an interesting packaging format called "cog" ( which promises that you don't have to worry to much about running your models 😅

Combining things together

Once we have the individual parts, Meteron allows to combine them painlessly. Add your Replicate model to Meteron and set the Meteron API key for the Next.js app. You are ready to go.

As a next step try playing with the prompt here ( or pick a different model altogether, here are some more examples: