Introducing Desk Open-source AI help center See it

Your AI needs your data. Not your database.

For developers adding AI to existing apps: multi-step workflows that call your backend at each step, while your app keeps control of the data.

Free plan · No credit card · Test mode runs without provider keys

Customer request
AI-powered tool
ModelRiver AI backend Waiting on your backend
Check availability Done
Find best seats Done
Reserve seats Awaiting your backend
Your backend
Venue API Pricing Calendar
Best seats found: front row, center
Reservation waiting for your backend

AI features get complicated after the first model call.

ModelRiver is a backend AI workflow orchestration platform that runs multi-step AI workflows and calls your application's backend at each step.

A model call turns into a workflow as soon as it needs your app's data, several API calls, your business rules, validation, retries, or live progress in the UI.

  1. Model call
  2. Needs your data and actions
  3. Now you are building a queue, webhooks, retries, and a WebSocket service

ModelRiver runs that layer. Your backend keeps the logic.

The core of ModelRiver

From one request to a backend pipeline

Start with one request. Add a session and it becomes a chatbot that remembers. When a step needs your data, your backend joins in.

Start simple: a chatbot

Send each new message with the session ID from the first reply. ModelRiver keeps the conversation, so you have no chat history to store.

How sessions work
POST /v1/ai
// First turn: ModelRiver starts a session
{ "workflow": "my_chatbot",
  "messages": [{ "role": "user", "content": "My order is 1234" }] }

// Next turn: same session, new message only
{ "workflow": "my_chatbot", "session_id": "9f8c…",
  "messages": [{ "role": "user", "content": "Cancel it please" }] }

When a step needs your data, add your backend

  1. You start it

    Your backend starts the workflow with POST /v1/ai/async and gets a channel back.

  2. ModelRiver runs the AI

    Steps run in order, up to 6 in a workflow, with backup models if a provider fails.

  3. Your backend answers

    A signed webhook asks for your data. Your code applies your rules and calls back.

  4. Users see it live

    ModelRiver runs the next step and sends live progress to the browser.

support-reply.js
// 1. Your backend starts the workflow
const headers = { "Content-Type": "application/json",
  Authorization: `Bearer ${process.env.MODELRIVER_API_KEY}` };
const job = await fetch("https://api.modelriver.com/v1/ai/async", {
  method: "POST", headers,
  body: JSON.stringify({ workflow: "support_reply", messages }),
}).then((r) => r.json()); // channel_id, ws_token, websocket_url, ...

// 2. ModelRiver calls your webhook. Verify x-modelriver-signature first.
app.post("/modelriver/webhook", async (req, res) => {
  res.sendStatus(200); // acknowledge first, then do the work
  const { ai_response, callback_url } = req.body.data;
  const order = await db.orders.find(ai_response.data.order_id);
  await fetch(callback_url, { method: "POST", headers,
    body: JSON.stringify({ data: { status: order.status, eta: order.eta } }) });
});
How backend pipelines work

Build the orchestration layer, or use one.

Here is what you would otherwise build and run yourself.

Build it yourself

  • A job queue and workers for long AI calls
  • Retry and fallback logic for each provider
  • Glue code that fetches data for the model at each step
  • A WebSocket service to push results to your users
  • Request logs you can search when something breaks

With ModelRiver

  • POST /v1/ai/async returns a channel right away
  • Failover to up to two backup models, plus webhook delivery retries
  • A signed webhook to your backend at each backend step, up to 6 steps
  • A hosted WebSocket channel per request, with a one-time token
  • Request, webhook, and callback logs in the console

Why not give an agent direct access?

Agents tend to work best with broad access to your systems and data. With ModelRiver, your backend decides exactly what each AI step receives and which actions run.

Frequently asked questions

How is this different from calling the OpenAI or Anthropic SDK directly?

The SDKs make one model call. ModelRiver runs the workflow around it: async requests your frontend can follow, a signed webhook to your backend at each backend step, failover to backup models, and logs for every request, webhook, and callback. You still use your own provider keys.

How is this different from an AI gateway?

An AI gateway sits between your app and model providers and routes each call. ModelRiver also connects to providers, but it is built around the workflow: it pauses for your backend, waits for your callback, carries the result to the next step, and sends progress to your users.

Does ModelRiver get access to my database?

No. ModelRiver never connects to your database. Your backend reads it and sends back only the fields the next step needs. Those fields are stored in your request logs and passed to later steps.

Which providers and models are supported?

ModelRiver supports 13 AI providers, 139 models in total, including OpenAI, Anthropic, Google, xAI, Mistral AI, Azure OpenAI, and Amazon Bedrock. You connect your own API keys. See the full list.

What does it cost?

The Free plan includes 25,000 requests a month. Paid plans start at $49 a month for 500,000 requests. You pay AI providers directly with your own keys. See pricing.

GitHub Client SDK on npm Changelog Status Security Founders' note

Run your first backend pipeline.