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

api.modelriver.com

1Your backend starts the workflow

POST /v1/ai/async
{
  "workflow": "support_reply",
  "stream": true,
  "messages": [
    { "role": "user", "content": "Where is order 1234?" }
  ]
}

2It returns a channel right away (202)

{
  "status": "pending",
  "channel_id": "3f8b2c71…",
  "ws_token": "eyJhbGciOi…",
  "websocket_channel": "ai_response:{project_id}:3f8b2c71…"
}

3Your frontend streams the answer

client.connect({
  channelId: res.channel_id,
  wsToken: res.ws_token,
  websocketChannel: res.websocket_channel,
});
client.on("stream_delta", (chunk, text) => render(text));
Your user sees

Order 1234 shipped on Monday and should arr

From a single AI request to a complete backend pipeline.

Send one request. ModelRiver runs the steps, calls your backend, and streams the result.

ModelRiver remembers the conversation. Send the session ID, not the history.

POST /v1/ai
{
  "workflow": "my_chatbot",
  "session_id": "9f8c2a1e…",
  "messages": [{ "role": "user", "content": "Cancel it please" }]
}
// First turn: omit session_id; it returns in meta.session_id
How sessions work
Sessions/9f8c2a1e…Memory on
  1. My order is 1234
  2. It shipped Monday and arrives Thursday.
  3. Earlier turns added by ModelRiver
  4. Cancel it please
  5. It has shipped. Want me to start a return?

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.

Why not give an agent direct access to my systems?

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.

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.