Connect your database. Ask anything.

ModelRelay runs RLM—it writes queries, reads the results, and reasons across them to answer. No vector DB. No chunking. Across any model, in your boundary. Embed it in your product, and bill your users per run.

You are on the list. We will email .

from modelrelay import ModelRelay

mr = ModelRelay(api_key="mr_sk_...")

answer = mr.rlm.execute(
    model="claude-sonnet-5",
    query="Which customers churned last quarter, and what did they have in common?",
    data_source={
        "type": "sql",
        "url": "postgres://[email protected]/app",  # read-only
    },
)

print(answer.text)
import { ModelRelay } from "@modelrelay/sdk";

const mr = ModelRelay.fromSecretKey("mr_sk_...");

const answer = await mr.rlm.execute({
  model: "claude-sonnet-5",
  query: "Which customers churned last quarter, and what did they have in common?",
  dataSource: {
    type: "sql",
    url: "postgres://[email protected]/app", // read-only
  },
});

console.log(answer.text);
01

Build

Answers over your data. No pipeline.

No vector DB

It writes the queries. You get the answer.

RLM inspects your schema, writes SQL, reads the rows, and decides what to ask next—iterating until it can answer. The model navigates your data with code, so only the slices it needs ever enter the context window.

No embeddings. No chunking. No reranking. For structured data you don't retrieve—you query.

RLM trajectory
claude-sonnet-5
inspect schema → 14 tables
SELECT id, plan, canceled_at FROM customers JOIN subscriptions WHERE canceled_at >= '2026-01-01'
read rows → 247 churned
refine: group by usage + tickets
llm_query × 4 summarize churn drivers
answer ready — 2 iterations, 4 subcalls
Your boundary · VPC / on-device
Your database
Postgres · MySQL · SQLite
RLM runtime
read-only queries
Your rows never leave this box.
subcalls only
Anthropic
OpenAI
Google
xAI
Runs where your data is

Your data stays in your boundary.

Run RLM next to your database—in your VPC, or on-device. The model queries your data locally and only the slices it needs are sent as subcalls, across any lab you choose.

  • Read-only by default—SELECT-only, with table, column, and row policies.
  • Your data stays in your boundary—VPC or on-device, never our cloud.
  • Neutral across labs—Anthropic, OpenAI, Google, xAI. Not locked to one warehouse.
  • The full trajectory—code, subcalls, intermediate results—is captured in your boundary. Yours to audit, replay, and learn from; an asset that compounds for you, not a provider.
02

Ship

Put it in your product.

Streaming

Watch it reason.

Stream the reasoning trajectory and typed results as the model queries your data—render rows as they arrive instead of waiting for the full response.

stream = mr.rlm.stream(
    model="claude-sonnet-5",
    query="Top 5 customers by revenue, one-line reason each",
    data_source={"type": "sql", "url": "postgres://readonly@db/app"},
)

for event in stream:
    if event.type == "progress":
        print(event.status)      # watch it reason
    elif event.type == "answer":
        render(event.rows)
const stream = await mr.rlm.stream({
  model: "claude-sonnet-5",
  query: "Top 5 customers by revenue, one-line reason each",
  dataSource: { type: "sql", url: "postgres://readonly@db/app" },
});

for await (const event of stream) {
  if (event.type === "progress") console.log(event.status); // watch it reason
  if (event.type === "answer") render(event.rows);
}
Churn analysis
Customer
Reason
Risk
Customer authentication

Bring your own sign-in.

Use your existing auth stack, then mint ModelRelay customer tokens from your backend. Keep identity in your hands while we meter usage.

  • Keep your existing auth policies and SSO.
  • Customer tokens map directly to per-user billing.
  • Control token lifetimes, rotation, and revocation.
  • Attach app-specific metadata to customers.
Backend minting flow
Your backend
+
User signs in with your auth
Mint a customer token on your backend
const token = await mr.auth.customerToken({ customerId: "cust_123" })
Customer Token
Scoped to user billing tier
03

Monetize

Bill your users. Keep the margin.

Per-user metering

Meter every hop. Bill every user.

One question from your user fans out into a tree of subcalls—variable depth, multiple models. Because ModelRelay runs the loop, it meters every hop and attributes the whole run to the customer who asked. A live cost basis per user, per run.

Set your tiers and prices on top, and keep the margin—there's no platform fee.

A billing proxy sees eighteen unrelated API calls. The runtime that executes the loop sees one run, one customer, one cost.

Powered by Stripe Checkout and payouts via Stripe Connect
Metered run
cust_4821 · Pro tier
root · claude-sonnet-5 $0.09
llm_query × 12 · claude-haiku-4-5 $0.21
llm_query × 5 · gemini-3-flash $0.10
billed to cust_4821 $0.40
17 subcalls · 3 models · one attributed cost

Build on RLM. Bill your users.

Connect a database, ask anything, and meter every user from day one.