The Margin Optimization Layer for AI builders

Stop scaling blind.
Turn your AI spend into margin.

Weflayr helps you continuously optimize your margin through AI cost reduction. It joins real revenue to real cost, per customer and per feature, for instant insights, and automatically finds optimizations from your real usage.

Private beta now.  Public launch September 2026.
Built with AI-native business leaders
Humanlinker muchbetter.ai Corma Topo Pillar Omniscient Grand Brew Kalipso
The Weflayr platform
Free up to 1B tokens ingested / month

Get full control of your unit economics

Weflayr captures every LLM call and joins cost to revenue, so you know which customers make you money and which ones cost you.

and then

Optimize your margins where it matters

See the margin gain from cheaper models and prompt-caching mechanisms, and act on it for the customers draining your margins.

Margin & savings overview Revenue Cost Margin Gross margin %
Total revenue
$831.12k
AI cost
$468.35k$374.05k
−20.1%
Total margin
$362.77k$457.07k
+26.0%
Gross margin
43.6%55.0%
+11.4 pts
Role-play cost
$146.98k$52.68k
−64.2%
$0.0 $50.95k $101.9k $152.84k $203.79k Jan Feb Mar Apr May Jun 62% 53% 61% 52% 55% 43% 55% 42% 51% 38% 51% 40%
P&L per customer2 customers at risk on margin
CustomerRevenue ↓CostMarginMargin %MoMStatus
Lumen Finance$301,691$98,653$203,03867.3%Healthy
Role-play simulation$37,033
Objection coach$16,313
Deal brief generation$19,684
Call scoring$13,524
Meeting recap$6,686
Knowledge Q&A$5,413
Northwind Labs$268,114$98,398$169,71663.3%Healthy
Role-play simulation$36,938
Objection coach$16,271
Deal brief generation$19,633
Call scoring$13,489
Meeting recap$6,669
Knowledge Q&A$5,399
Cobalt AI$122,683$46,251$76,43262.3%Healthy
Role-play simulation$17,362
Objection coach$7,648
Deal brief generation$9,228
Call scoring$6,340
Meeting recap$3,135
Knowledge Q&A$2,538
Tessa Health$91,337$45,394$45,94350.3%Watch
Role-play simulation$17,040
Objection coach$7,506
Deal brief generation$9,057
Call scoring$6,223
Meeting recap$3,076
Knowledge Q&A$2,491
✦ Weflayr optimizationDrift Studios$58,900$46,531$12,36921.0%At risk
Role-play simulation$17,467
Objection coach$7,694
Deal brief generation$9,284
Call scoring$6,379
Meeting recap$3,154
Knowledge Q&A$2,553
✦ Weflayr optimizationBeacon Edu$41,200$42,436-$1,236-3.0%At risk
Role-play simulation$15,930
Objection coach$7,017
Deal brief generation$8,467
Call scoring$5,817
Meeting recap$2,876
Knowledge Q&A$2,328
Illustrative data from the Weflayr product
Built for teams that carry other people's data
SOC 2 Type IIOngoing
ISO 27001Ongoing
GDPR compliant
SOC 2 Type II and ISO 27001 certifications are in progress. Weflayr is GDPR compliant, with sub-processors in the EEA.
How it works

Observe. Alert. Recommend. Optimize.

Observability is the way in. Optimization is the product.

01

Observe

One line of code captures every LLM call and joins cost to revenue. Live P&L per customer and feature.

02

Alert

Get told when a feature cost climbs or a customer turns loss-making. Before the bill lands.

03

Recommend

Cheaper models that hold quality or prompt caching optimization. Measured on your real traffic, with the margin gain measured before you ship.

04

Optimize

Enforce the recommendations.

Prompt caching optimisation Live

Weflayr's unique prompt caching optimisation engine indexes every prompt your project sent and finds the blocks that repeat, across calls, across features, across customers. It searches the optimal caching configuration your provider actually supports, restructures the prompt when the stable content sits in the wrong place, and validates each candidate on traffic it was not derived from.

Est. savings
$4.14k/mo
−15% of feature cost
Caching captured
61%
of achievable caching
A Prompt structure only anthropic/claude-opus-5 · Hoist the shared instructions above both volatile blocks Cross-feature $2.68k/mo

The features Support Chat and Auto-Summarize both open with a run_context header, and both re-inject a per-workspace activity block between the instructions and the worked examples. Two volatile blocks therefore sit inside the 5,560 tokens the two features send byte-identical, so the cache breaks at the first of them and nothing below is ever reused. Hoisting the instructions, the worked examples and the output format into one contiguous region, with both volatile blocks below them, lets the two features read a single cache entry instead of paying twice for the same tokens.

RISK: SAFE

The moved blocks reference nothing in the run header or the activity block, so both orderings read identically to the model. No wording changes.

B Config only anthropic/claude-opus-5 · Put the breakpoint at the end of the worked examples, and hold the cache an hour $1.46k/mo

The breakpoint sits after the first user turn today, so the cached region includes content that changes on every call and the entry is rewritten instead of read. Placing it at the end of the worked examples caches only the stable region. Support Chat's calls also arrive further apart than five minutes, so the hour TTL earns back its higher write price.

explicit · 5 min explicit · 1 h
RISK: SAFE

Breakpoint placement and TTL are caching config. The prompt text and its order are untouched.

Finding A · one sampled call of the feature Support Chat, as it ran and with the fix
CachedNot cachedMoved by the fix
AS IT RAN · ~0 OF ~8,690 TOK CACHED
[system]
run_context: {"run_id": "8f3c1a94", "started_at": "2026-06-14T09:12:41Z", "locale": "en-GB"}
You are the Support Chat assistant for Northwind Labs. Answer only from the workspace's own documentation and ticket history; when the answer is not there, say so and offer to open a ticket. Never invent an API field, a plan limit or a price.
## Recent activity for this workspace last_export: 2026-06-13T22:04Z · open_tickets: 7 · last_seen_agent: rosa.k
## Worked examples Q: Can I raise the export row limit? A: It is 500k rows per export on enterprise [docs/exports#limits]. Split the range, or ask me to open a ticket. Q: Does deleting a workspace delete its exports? A: Exports live 30 days past deletion [docs/retention#exports], then go for good. … 6 more worked examples
## Output format Open with the answer, then the doc section in brackets. Ask at most one follow-up question, at the end.
WITH THE FIX · ~5,560 OF ~8,690 TOK CACHED
[system]
You are the Support Chat assistant for Northwind Labs. Answer only from the workspace's own documentation and ticket history; when the answer is not there, say so and offer to open a ticket. Never invent an API field, a plan limit or a price.
## Worked examples Q: Can I raise the export row limit? A: It is 500k rows per export on enterprise [docs/exports#limits]. Split the range, or ask me to open a ticket. Q: Does deleting a workspace delete its exports? A: Exports live 30 days past deletion [docs/retention#exports], then go for good. … 6 more worked examples
## Output format Open with the answer, then the doc section in brackets. Ask at most one follow-up question, at the end.
run_context: {"run_id": "8f3c1a94", "started_at": "2026-06-14T09:12:41Z", "locale": "en-GB"}
## Recent activity for this workspace last_export: 2026-06-13T22:04Z · open_tickets: 7 · last_seen_agent: rosa.k

Model benchmarking Live

Weflayr replays your real production runs on candidate models and judges each output against the one you actually shipped. You get the quality delta and the cost delta before you switch a single token.

Est. savings
$6.9k/mo
−74% of feature cost
Same or better
96.7%
4.1% better · 92.6% same · 3.3% worse
1,000 production runs replayed of the feature Support Chat · 94% of them ran on openai/gpt-5.5 at $0.0042 / run
Candidate modelQuality vs gpt-5.5Cost / runLatency
claude-haiku-4.5Anthropic
41 better · 926 same · 33 worse
$0.0009-79%
▼38%
Recommended
deepseek-v3.2DeepSeek
29 better · 917 same · 54 worse
$0.0006-86%
+12%
gpt-5-miniOpenAI
22 better · 911 same · 67 worse
$0.0004-90%
▼31%
ministral-3-14bMistral
12 better · 605 same · 383 worse
$0.0007-83%
▼19%
Quality drop
gemini-3.1-flash-liteGoogle
8 better · 583 same · 409 worse
$0.0003-93%
▼44%
Quality drop

Margin-aware semantic routing On the roadmap

Point your calls at Weflayr's gateway and the recommendations you accepted apply themselves on every request: the cheaper model where quality holds, the prompt order that hits the cache, the right path for each customer's margin.

  • Routes on live margin, not list price
  • All frontier models plus self-hosted open source in the EU
  • Uses the per-customer margin labels only you hold
Integrate in minutes

Few lines to instrument. Every call captured.

Weflayr tracks all your LLM calls with one line of code. Then tag each call with the customer and the feature, and cost lands in your dashboard joined to revenue.

Read the technical docs
import weflayr

# one line: instrument your provider SDK, call sites unchanged
weflayr.auto_instrument(ai_sdks=weflayr.AiSdk.OPENAI)

# tag each call with who it is for and why
with weflayr.propagate_metadata(
    feature_name="support-chat", customer_id="c_123"
):
    client.chat.completions.create(
        model="gpt-5.5",
        messages=[{"role": "user", "content": prompt}],
    )