Documentation

ModelRiver Documentation

ModelRiver is AI backend infrastructure: one AI gateway for every provider, plus workflows that call your backend at each step. Your data, permissions and business logic stay in your systems.

Start here

AI Agent
 Help me get set up with ModelRiver.

First, inspect this project to understand its stack, structure, and conventions.

Then:
1. Determine the appropriate ModelRiver integration for this project.
2. Install the required ModelRiver package or SDK.
3. Configure the ModelRiver client using environment variables.
4. Create a minimal working request that calls a ModelRiver workflow.
5. Explain any environment variables I need to set (API key, workflow name, etc.).
6. Follow the project's existing architecture and conventions.
7. Do not modify production configuration without asking me first.

Examples and guides

Use cases

Ready-made ModelRiver workflows for common business tasks, with step-by-step integration guides.

See all 12
Desk

An open-source support app built on ModelRiver: a chat widget, a help center and a team dashboard you run yourself.

See all 7

Build

Workflows

Save a provider, model, fallbacks, structured output and cache fields once, then call them by name.

See all 5
API

Send requests to the unified ModelRiver endpoint, use OpenAI-compatible SDKs, handle streaming, and more.

See all 13
Client SDK

Show AI results live in your frontend with React, Vue, Angular, Svelte or plain JavaScript.

See all 5
Structured outputs

Define and enforce specific JSON schemas for AI responses.

Cache

Reduce latency and costs by caching frequent AI responses.

Connect your backend

Hosted tools

Register your HTTPS endpoints as tools. The model picks which to call and ModelRiver makes the signed calls.

See all 9
Backend pipeline

Build backend pipeline architectures with async endpoints, webhook callbacks, and real-time delivery to clients.

Webhooks

Signed deliveries of async results, and callbacks to your backend during a pipeline, with retries.

Integrations

Connect ModelRiver to LLM frameworks, agent systems, backend stacks, knowledge and memory, and automation tools.

See all 6

Operate

Console

Manage your projects, monitor usage, and configure settings.

API keys

Manage authentication credentials for programmatic access.

Observability

Monitor, debug, and analyze every AI request with comprehensive logging, timelines, and webhook tracking.

See all 11
Security

Organization roles, project protection, encrypted provider keys, data retention and guardrails.

See all 7
CLI tool

Test webhooks and requests on your machine: listen, forward, trigger and watch WebSocket events.

See all 5

Solutions

High availability

Build production-grade AI applications with automatic model failover and redundancy.

Real-time streaming

Everything you need to know about implementing real-time AI streaming using WebSockets.

Type-safe AI outputs

Stop parsing text and start using JSON with validated Structured Outputs.

Help

FAQ

Quick answers to commonly asked questions about platform features.

Troubleshooting

Diagnostics and solutions for common challenges.

Need help?