Free embed · no card

Drop in one file. Every prompt, routed and saved.

SmartMem runs inside your system. It scores each request locally, picks the cheapest model that can still do the job, and reports only the savings. Your prompts and your customers' answers never touch our servers.

40–90%
typical bill reduction
0
prompts sent to us
<5 ms
local routing decision
$0
to use

The embed

One 10 KB file, zero dependencies. Wrap your existing model call — that's the whole integration. Every request after it is routed and counted.

Drop this into your codebase
import { SmartMem } from "https://getsmartmem.com/sdk/smartmem.js";

const sm = new SmartMem({ apiKey: "sm_live_..." });

// before: openai.chat.completions.create({ model: "gpt-5.6-sol", messages })
const reply = await sm.complete(
  { messages },
  (model) => openai.chat.completions.create({ model, messages })
);

Works in Node 18+, serverless functions, edge runtimes and the browser. The file is served straight from this site at /sdk/smartmem.js and is small enough to read in full before you ship it.

1

Get a free key

Sign up, mint a key on your dashboard. It's shown once and stored only as a hash.

2

Wrap your calls

sm.complete() routes locally and calls your provider function with the chosen model.

3

Watch the savings

Each request posts token counts and the routing outcome to your dashboard. Numbers only.

See it decide

The exact classifier from the embed, running in your browser. Paste a prompt you actually run — it scores it and prices both options side by side.

Try a task
Minimum capability you'll accept0.00
Compare against

This runs entirely in your browser. Nothing you type here leaves your device.

Recommended model
Gemini 3.1 Flash Lite
google/gemini-3.1-flash-lite
Baseline
$0.000242
Routed
$0.000008
Saved
97%
Difficulty
simple (0.041)
Task type
extraction
Capability floor
0.70
Tokens
26 in / 21 out (est.)
Baseline model
GPT-5.6 Sol

Classified as simple (0.041) — needs capability ≥ 0.70. Gemini 3.1 Flash Lite is the cheapest model clearing that bar for a extraction task.

Runners-up
  • GPT-5 Nano$0.000010
  • Grok 4 Fast$0.000016
  • Grok 3 Mini$0.000018
Get a free API key

How it works

01

Embed

You add one file to your system. It carries the classifier and the price catalog — no network hop to us.

02

Score locally

Length, code, multi-step reasoning and task type turn into a difficulty score between 0 and 1, inside your process.

03

Call the provider

The embed hands your function the cheapest model clearing the capability bar. Your call, your account, your data path.

04

Report savings

Only token counts, the model and the cost figures travel to us. Your dashboard totals the savings.

The catalog it routes across
ModelCapability$/1M in$/1M outTypical latency
Claude Opus 50.99$15$753200 ms
GPT-5.6 Sol0.97$1.25$102600 ms
Claude Sonnet 50.94$3$151800 ms
GPT-5.6 Terra0.90$0.6$41200 ms
Gemini 3.8 Flash0.87$0.3$2.5900 ms
GPT-5.6 Luna0.81$0.15$1.2600 ms
Gemini 3.1 Flash Lite0.74$0.075$0.3420 ms
GPT-5 Nano0.70$0.05$0.4350 ms
Grok 40.95$3$152400 ms
Grok 4 Fast0.84$0.2$0.5700 ms
Grok 3 Mini0.76$0.3$0.5500 ms

Why it pays for itself

Stop paying frontier prices for easy work

Most production traffic is classification, extraction, formatting and short answers. A top-tier model handles those perfectly — and charges up to 200x more than a small model that handles them just as well.

A capability floor, not a coin flip

Every request gets a difficulty score and a minimum capability it must clear. Hard requests still go to the strongest model. Cheap models only get work they can actually finish.

Prompts never leave your infrastructure

The router is code on your side. Classification happens inside your process, the provider call uses your own account, and the only thing SmartMem ever receives is a savings number.

Savings you can show your finance team

Your dashboard totals what you would have spent against what the routed model costs, broken down by day and by model. Export-ready numbers, no guesswork.

Under 5 ms, with no added hop

Routing is a pure scoring function over a price table that runs in your process. No extra network round trip between you and your users, no added latency.

Free, with no seat count

The embed costs nothing to use. No card, no per-request fee, no tier gates on the dashboard.

FAQ

Find out what you're overpaying.

Sign up, mint a key, wrap one call. The dashboard starts counting immediately.

Get a free key