Backend AI workflow orchestration

Your AI needs your data. Not your database.

Build multi-step AI workflows that call your backend APIs and business logic at each step, with live updates to your users. Your application keeps control of data, permissions, and actions.

For developers adding AI to existing applications.

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

13 AI providers 133 models 13 ready-made templates Switch providers anytime
Customer request
AI-powered tool
ModelRiver AI backend Waiting on your backend
Controls Context Session Allowed tools Model
Check availability Done
Find best seats Done
Reserve seats Awaiting your backend
Send confirmation Queued
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

How a backend pipeline runs

  1. Your application Your backend starts the workflow with POST /v1/ai/async and gets a channel back.
  2. ModelRiver ModelRiver runs the AI step.
  3. ModelRiver ModelRiver sends a signed webhook to your backend.
  4. Your application Your code fetches only the fields needed, applies your business rules, and calls back.
  5. ModelRiver ModelRiver runs the next step and sends live progress to the browser.
  6. Your application Your app receives the final result and decides any consequential action.
support-reply.js
// 1. Your backend starts the workflow, then sends the channel to the browser
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 } }) });
});

// 3. Your frontend gets live updates (@modelriver/client/react)
const { connect, steps, response } = useModelRiver();
connect({ channelId: job.channel_id, wsToken: job.ws_token,
  websocketUrl: job.websocket_url, websocketChannel: job.websocket_channel });
  • Up to 6 stepsSteps run in order. Each one is a backend step or an AI step.
  • Signed webhooksCheck the x-modelriver-signature header. Deliveries are retried up to 3 times.
  • 10-minute callback windowAcknowledge the webhook right away, then call back within 10 minutes.

Your application stays responsible for authorization, validation, and business rules. ModelRiver does not replace them.

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, 133 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 $9 a month. 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.