The missing layer for AI apps

Add BYOK, routing, and product-level controls on top of your existing AI stack. Works with OpenRouter, Portkey, Vercel AI, or direct providers.

No proxy. No infrastructure. No migration.

Restormel Keys is a product in the Restormel platform.

For AI SaaS builders and small teams that want one control layer across gateways and direct providers.

Launch offer: First 50 signups receive 12 months of Pro.

AI infrastructure is solved. Product logic isn’t.

Tools like OpenRouter, Portkey, Vercel AI Gateway, and LiteLLM handle infrastructure concerns: provider access, aggregation, and (often) proxy-style routing. But every AI product still has to build the application layer: end-user BYOK, plan-based model access, budgets, and routing decisions based on user context. Restormel Keys is that missing application layer — designed to sit above your existing stack.

Restormel sits above your existing stack

Keep your infrastructure. Restormel adds the application layer: BYOK for your users, routing based on user + plan, cost awareness before execution, and embeddable UX for key management.

Layer 1 — Infrastructure

OpenRouter / Portkey / Vercel AI / direct providers

Layer 2 — Application

Restormel Keys (BYOK, routing, policies, entitlements, budgets)

Three ways to use it

Gateway-backed, builder-managed direct, or end-user BYOK. Same core; adopt progressively.

Gateway-backed

Keep OpenRouter / Portkey / Vercel AI Gateway as your provider-access layer. Use Restormel for routing policies, health, analytics, and progressive rollout.

Builder-managed direct

Keep provider keys in your env/secrets manager. Restormel resolves the route/model/provider decision; you supply provider access from your own infrastructure.

End-user BYOK (builder-managed)

Offer a KeyManager UX for users, but store credentials in your backend (or a gateway-backed scheme). Restormel remains the control layer.

Add it to your stack

One route handler and, if you want end-user model choice, one settings page. Works with your existing gateway or direct provider keys.

Server
ts
// app/api/chat/route.ts (Next.js App Router)
import { createResolveMiddleware } from "@restormel/keys";

const resolve = createResolveMiddleware({
  // Provider access stays in your stack (env vars, secret manager, or a gateway like OpenRouter/Portkey/Vercel AI Gateway).
  // Restormel resolves routing + policy; you decide how to supply provider access.
  providers: ["openai", "anthropic"],
});

export async function POST(req: Request) {
  const { model, messages } = await req.json();
  const { provider } = await resolve(model);

  // Example: builder-managed direct provider mode (keys live in your env/secrets manager).
  const apiKey =
    provider.type === "openai" ? process.env.OPENAI_API_KEY :
    provider.type === "anthropic" ? process.env.ANTHROPIC_API_KEY :
    undefined;
  if (!apiKey) return new Response("Missing provider access", { status: 500 });

  const res = await fetch(provider.chatUrl, {
    method: "POST",
    headers: { "Authorization": `Bearer ${apiKey}` },
    body: JSON.stringify({ model, messages }),
  });
  return Response.json(await res.json());
}
React / Next.js
tsx
// app/settings/page.tsx
import { KeyManager } from "@restormel/keys-react";

export default function Settings() {
  return (
    <KeyManager
      keys={keys}
      onKeyAdded={handleAdd}
      userId={user.id}
    />
  );
}

Fits your framework

Next.js App Router is the primary path. React: wrapper components plus hooks. SvelteKit: native Svelte 5 components. Web Components for Astro, vanilla HTML, or any framework. Same API; no Docker, Redis, or proxy.

  • Next.js
  • React
  • SvelteKit
  • Vue
  • Astro

What's in the box

Routing, policies, health, cost, and embeddable UX that sit alongside your existing provider access.

Integrations

Works with OpenRouter, Vercel AI Gateway, Portkey, and direct providers.

Restormel Resolve

Model → provider resolution. One middleware, multiple backends.

Cost

Per-model cost and budget comparison. Estimate before you call.

Entitlements

Gate features by tier. Optional usage limits.

Embeddable UX

ModelSelector, CostEstimator, and optional KeyManager. Svelte, React, or Web Components.

Restormel Doctor & Validate

Health checks you can run locally or in CI to catch bad config and broken provider access before deploy.

Where Restormel fits in your AI stack

CapabilityLiteLLM / Portkey / OpenRouterRestormel Keys
Primary roleInfrastructure / gateway / proxyApplication-layer library
How it runsHosted service or self-hosted infraRuns inside your app
Request routingYes (proxy-based)Yes (in-app, key-aware)
Request/response normalisationYesHandled by your provider or gateway
CachingSometimes built-inUse your existing cache (Redis, CDN, gateway)
Observability / tracingOften built-inUse your existing observability tools
Access to multiple providersYes (via proxy or aggregation)Yes (via your providers or OpenRouter)
End-user BYOK (bring your own keys)NoYes — first-class
Embeddable key management UINoYes — drop-in components
Per-user model availabilityNoYes — based on user keys
Cost estimation (before request)LimitedYes — built-in
Plan-based entitlementsLimitedYes — first-class
Library-first (no infra required)NoYes
Works with existing stackN/A (is the stack)Yes — designed to sit on top

Restormel doesn’t replace your AI gateway — it completes it. Use OpenRouter, Portkey, or direct providers for infrastructure. Use Restormel to add BYOK, routing logic, and product-level controls.

Pricing

Free to build. Upgrade to Pro when you’re ready to ship.

Early access: First 50 signups get 12 months of Pro included.

Free

$0

Best for prototyping. 2 projects and 1,000 requests/month.

Pro

$10/mo

Best for production. Higher limits, visibility, and routing controls.

See full pricing and FAQ →

Add governance to your AI stack

Install the packages, pick gateway-backed or direct provider access, then add routes and policies. The walkthrough guides you step by step.

Get started