How do I deploy my AI-built app and connect it to multiple AI models from the same backend?

Deploy your AI-built app's Node backend on Dongee Live and have it call several AI models through Dongee AI Router, using one base URL and one key stored as environment variables.

To deploy an AI app that talks to multiple AI models, upload its Node backend (Express or Hono) to Dongee Live, a hosting platform for AI-built apps, and have it call Dongee AI Router, an OpenAI-compatible API for several models, with one base URL and one key stored as environment variables. Live serves it over HTTPS on your domain. This guide walks you through every step, with no servers to configure.

Updated November 23, 2026 · Dongee Team

What should you check in your app before choosing where to deploy it?

Before you deploy, open the project that Lovable, Bolt, Cursor or ChatGPT generated for you and check five things:

  • Frontend: the interface folder (React, Vite, Next.js) and its build command.
  • Backend: whether there is a Node server with routes like /api or everything runs in the browser.
  • Dependencies: check the package.json and the Node version it uses.
  • Environment variables: keys, service URLs and model names.
  • Database: whether it uses MySQL, Supabase or another external service.

If you don't know whether your project is static or needs a server, this guide helps you find out: how to tell if your Lovable app is static or needs a server. As soon as your app calls AI models, you need a backend, because the model API key must never go in the frontend: anyone who opens the browser's developer tools would see it and could spend your credit.

OptionControlWhat you manageStacksAgency use case
The tool's built-in cloud (for example, Lovable Cloud)Whatever the tool allowsLittle; the platform handles itWhatever the tool supportsPricing and limits: check its plan
Dongee LiveMedium: your code, your variables and your domainJust the app; Live maintains the system and the web server, and restarts the app if it crashesStatic sites and Node 20/22/24 (Express, Fastify, Koa, Hono, Next.js standalone, TanStack Start)Live Team: 10 client apps; in AI Router, one key per client
Dongee CloudFull: root SSH access, unrestricted DockerThe whole server (system, security, updates)Whatever you installFor teams that manage their own servers

If you work with several clients, compare options in platforms for agencies that deploy clients' AI apps.

How do I deploy the app and put it on my domain?

  1. Create your account on Dongee Live. The Live Free plan costs 0 USD and includes 1 app, 1 MySQL database and 1 email account.
  2. Choose how to deploy:
  • From your coding assistant (MCP): install the skill with npx skills add dongeelive/skills -g -y and tell it "deploy". The upload limit for this method is 100 MB.
  • From GitHub: connect the repository with one click. Every push deploys a new version, and the build runs on GitHub. The limit is 32 MB.
  1. Your app goes live on a free subdomain like myapp.dongee.live.
  2. If you want your own domain, connect it in the Live dashboard. The dashboard tells you what to change at your registrar, and Live issues and renews the HTTPS certificate. Live does not include domain registration: you buy the domain from an accredited registrar for that extension.

You don't have to install or configure any web server.

How do I connect the backend to multiple models with a single key?

  1. Activate Dongee AI Router from your client area.
  2. Copy the base URL and the list of available models from the client area.
  3. Create a key just for this app and restrict it to the models it will use. The step-by-step is in how to restrict an API key to specific AI models.
  4. In your app's environment variables on Live, save AI_BASE_URL, AI_API_KEY, MODELO_ECONOMICO (cheap model) and MODELO_AVANZADO (advanced model).
  5. Install the OpenAI SDK for Node and pass it baseURL. If this is your first time, check out the OpenAI SDK in Node.js with a compatible API.
import express from "express";
import OpenAI from "openai";

const app = express();
app.use(express.json());

const ai = new OpenAI({
  baseURL: process.env.AI_BASE_URL,
  apiKey: process.env.AI_API_KEY,
});

const TAREAS_SIMPLES = ["clasificar", "resumir_corto", "extraer"];

function elegirModelo(tarea) {
  return TAREAS_SIMPLES.includes(tarea)
    ? process.env.MODELO_ECONOMICO
    : process.env.MODELO_AVANZADO;
}

app.post("/api/chat", async (req, res) => {
  const { tarea, mensajes } = req.body;
  try {
    const r = await ai.chat.completions.create({
      model: elegirModelo(tarea),
      messages: mensajes.slice(-6),
      max_tokens: 600,
    });
    res.json({ respuesta: r.choices[0].message.content });
  } catch (err) {
    res.status(502).json({ error: "The AI didn't respond. Please try again." });
  }
});

app.listen(process.env.PORT || 3000);

The frontend only calls /api/chat and never sees the key. If you want the text to appear as it's generated, add stream: true: AI Router supports streaming. With Hono the pattern is the same; only the route syntax changes.

What criteria should I use to split requests between models?

CriterionHow to decide it in your code
Task typeClassifying, extracting or writing short summaries goes to the cheap model; reasoning, long-form writing or code generation goes to the advanced one.
Context length (tokens)Estimate the prompt size; if it goes over a threshold, trim the context or use a model that accepts long contexts.
Latency the user will tolerateFor live chat, use a fast model with streaming; for background tasks you can use a slower one.
CostCheck usage per model and save the advanced one for what really needs it.
If a model failsCatch the error and retry with another model from your list, up to a maximum number of attempts.
API limitsOn rate-limit errors, wait and retry with increasing delays instead of retrying immediately.

With AI Router, you program the routing yourself: Dongee has no automatic fallback. If you want to retry with another model, put that logic in your catch or run it behind your own gateway, such as LiteLLM. Model routing decides which model answers based on the request. Traditional load balancing spreads traffic across identical servers. We explain it in depth in AI model routing vs. load balancing.

How do I control token spending?

  • Watch your usage: AI Router shows it per model, per key and per request, so you know which route in your app spends the most.
  • Prepaid: top-ups from 3 USD, no monthly fee, and you can pay in COP, USD, MXN, PEN, CLP, BRL or EUR. New accounts get a welcome credit.
  • No debt: if your credit runs out, requests stop and no debt is created.
  • Trim the history: send only the latest messages or a summary of the conversation.
  • Cap max_tokens according to the task.
  • Cache repeated responses, such as FAQs or identical classifications.

What are the most common mistakes?

  • Putting the API key in the frontend.
  • Using a single key for every app or every client, and not knowing who is using what.
  • Not restricting the key to the models the app uses.
  • Sending the entire history with every request.
  • Not handling the error when credit runs out, leaving the app hanging with no message.
  • Confusing deploying the app with "deploying a model". Live deploys apps; you consume models through an API.

Frequently asked questions

Does Dongee Live host AI models?

No. Live deploys apps and sites built with tools like ChatGPT, Lovable, Bolt, v0, Claude Code, Codex, Cursor or VS Code. Models are consumed through an API, for example with AI Router.

Can I use AI Router from an app deployed somewhere else?

Yes. It's an OpenAI-compatible API that works with a base URL and a key, so you can call it from any backend.

How much does it cost to get started?

Live Free costs 0 USD, and AI Router runs on prepaid credit from 3 USD, with no monthly fee. If you need more apps, Live Pro costs 15 USD/month (3 apps) and Live Team costs 29 USD/month (10 apps).

Does it work for agencies?

Yes. Live Team allows 10 apps, and on Pro and Team each app can have its own domain. In AI Router you can create as many keys as you need: one per client, each restricted to its models and with its usage in plain view.

Does Live support Python?

No. Live supports static sites and Node 20, 22 and 24. It doesn't support Python, Ruby, PHP or Docker. If your backend is in Python, you can use Dongee Cloud, where you manage the server yourself.

In short: a Node backend on Live, one key per app in AI Router and a function that picks the model based on the task. If you get stuck on any step, Dongee's 24/7 human support in your language (the platform translates on the fly), available by chat or WhatsApp, can help you review it.

Comenta lo que quieras

Unete a la charla
Solo ingresa tu email