Skip to content

Halve your
AI bill.

The AI router that sends easy prompts to cheap models, and hard ones to your best.

Change one line of code. Halfy reads every request, picks the cheapest model that can answer it well, and shows you what you saved.

~50% cheaper on 10,000 held-out prompts · beats RouteLLM's router · see your savings free

Animation: Halfy, a round half-pink half-white mascot, catches incoming requests and throws easy ones into the cheap model's bucket and hard ones into the strong model's bucket.

Works in front of the providers you already use

  • OpenAI
  • Anthropic Claude
  • Azure OpenAI
  • Groq
  • OpenRouter
  • Together
  • Ollama
  • vLLM

I'm a…

For developers

Change one line. Keep everything else.

Halfly speaks the OpenAI API, so your SDK, streaming and tool calls keep working. It routes to OpenAI, Anthropic Claude, Azure, Groq, OpenRouter, Ollama, or anything OpenAI-compatible.

  1. 1

    Free to try: no card, no sign-up

  2. 2

    Pick your cheap and strong models

  3. 3

    Proxy on :8000 · dashboard on /dashboard

1from openai import OpenAI2 3client = OpenAI(base_url="http://localhost:8000/v1")4 5reply = client.chat.completions.create(6    model="halfly-auto",7    messages=[{"role": "user", "content": question}],8)
# every response says what happened
x-halfly-tier: weak · x-halfly-cache: miss

Meet Halfy. Your AI's accountant.

Three habits, one goal: never pay top price for an answer a cheaper model could give just as well.

  1. Step 1

    Halfy reads every request

    A small model we trained predicts whether a cheap model will answer well. Easy questions go cheap. Hard ones go to your best model.

    47 msto decide, on a plain CPU
  2. Know this one!

    Step 2

    Repeats are free

    Asked the exact same thing before? Halfy answers from memory, instantly, at no cost. Each customer's cache is private to them.

    $0for every repeated request
  3. Step 3

    Long documents get trimmed

    Halfly keeps the sentences your question needs and drops the filler. Code, numbers, links and the question itself are never touched.

    98%of answers kept at half the tokens

Safety first. If a model is down or busy, Halfy tries the other one. If anything about the router fails, requests go to your strong model, so quality never drops silently.

New

Set the quality.
Halfly hits it.

No thresholds to tune. Say how good answers must be, and Halfly works out the routing. Its router's scores are honest, so “95% sure” really means about 95%.

Pick a quality target

The share of answers that must be as good as your strong model's.

Target 95%: Halfly delivered 96.1% and cut cost by 58%.

You ask for

95%

of answers

You get

96.1%

+1.1 pts

You save

58%

off the bill

# halfly.yaml
router:
  quality_target: 0.95

How it works. For each prompt, the router estimates the chance a cheap answer is good enough, and those estimates are honest. Halfly picks the cut-off that meets your target, then keeps checking itself with audits.

Cost saved at each target

5,000 held-out prompts, cheap model priced at 6% of the strong one, before any audits. Higher quality, smaller saving.

Bar chart of cost saved at each quality target. Target 90%: delivered 91.0%, saved 82%. Target 95%: delivered 96.1%, saved 58%. Target 97%: delivered 98.2%, saved 43%. Target 99%: delivered 99.7%, saved 19%.
  • 90% → 91.0%82%
  • 95% → 96.1%58%
  • 97% → 98.2%43%
  • 99% → 99.7%19%

Holds on every kind of prompt

On code, maths, short and long prompts it stayed within about 1 point of the target. Lowest: 94.0% on 166 code prompts at a 95% target.

Gets bolder as it learns

It starts careful. Once audits confirm it on your traffic, it routes more boldly: after 1,000 audits, a 95% target saves 61.7% instead of 58% (median quality 95.5%).

Change it per request

One call that must be perfect? Send "halfly": {"quality": 0.99} with it.

Safe to switch on. Safe to leave on.

Seven more new things, so saving money never means losing sleep.

Don't trust us.
Check the numbers.

Every result below comes from test data the models never saw while training. We share the raw metrics and the test scripts with any team evaluating Halfly.

The router beats RouteLLM

Average quality gap recovered (APGR) across every budget, on 10,000 held-out prompts. Higher is better.

Bar chart of APGR by router. Halfly 0.731, RouteLLM BERT 0.722, logistic regression 0.700, kNN 0.692, prompt length 0.621, random 0.498, perfect router 0.932.
  • Random0.498
  • Prompt length0.621
  • kNN0.692
  • Log. regression0.700
  • RouteLLM BERT0.722
  • Halfly0.731
  • Perfect router0.932

99%

of re-tests won vs RouteLLM

2,000 bootstrap resamples · lead +0.0015 to +0.0168 (95% CI)

19×

more honest scores

Calibration error 0.016 vs 0.303: “90% sure” means ~90%

8×

smaller model

33M vs 278M parameters

47ms

to decide

Median, 2 CPU threads, no GPU

In plain words

With a cheap model at 6% of the strong model's price, the bill drops about 50% while 97.3% of prompts still get strong-model quality. Playing it safer: about 25% off at 99.3%.

Half the tokens, the answer still there

Share of long prompts (≈2,900 tokens) that still contain the answer after cutting them to half their tokens. 200 fresh SQuAD v2 items.

Bar chart of answers kept at half the tokens. Halfly 98.0%, LLMLingua-2 80.0%, truncation 60.5%, random word drop 51.0%.
  • Random drop51.0%
  • Truncation60.5%
  • LLMLingua-280.0%
  • Halfly98.0%

Trade-off: about 1 second per 1,000 tokens on a CPU, so it is off by default and meant for long documents.

A cache that refuses to guess

Wrong answers served on 54 hand-written trap pairs, like “sort ascending” vs “sort descending”.

Similarity matching
50%
the usual approach
Halfly verifier
0%
rule guard + NLI model

Honest note: it is cautious and catches only about a quarter of true rewordings, so “same meaning” caching ships switched off. Exact-match caching is always on.

Router labels: a GPT-4 judge scored the cheap model's answer (Mixtral) against GPT-4's; a prompt counts as “fine on the cheap model” at 4/5 or above (86.5% of prompts). Data: RouteLLM gpt4_dataset (Apache-2.0), SQuAD v2 (CC BY-SA 4.0). Your own model pair will differ, so Halfly logs your real savings per request.

See your savings free.
Unlock them for £5.

Install Halfly free and it watches your real traffic: your users see no change, and your dashboard counts what routing would save you, at what checked quality. Like the number? Switch it on for £5 a month.

Free

£0forever

See what you would save, on your own traffic.

  • Installs in minutes. No card, no sign‑up
  • Observe mode: every request still goes to your strong model, so your users see no change
  • Dashboard shows what routing would save, and at what checked quality
  • Budget caps on your AI spend
Start free

Switch the savings on

Starter

£5a month

Turn the savings you saw into real ones.

  • Routing with the quality dial: easy prompts to the cheap model, hard ones to your best
  • Exact cache: repeat questions are answered for free
  • Fallback to the other model on errors and rate limits
  • Budget caps, savings dashboard and halfly report
Buy Starter

Pro

£10a month

Savings that keep growing as Halfly learns.

  • Everything in Starter
  • Self-learning: halfly learn tunes routing on your own checked traffic
  • Cost per feature of your app, with quality per feature
  • Weekly Slack-style savings report and budget alerts
  • Prompt compression for long prompts
Buy Pro

Cancel any time. If you stop paying, your app keeps working: Halfly simply goes back to free observe mode.

Halfly runs on your servers, so your prompts never reach us. Prices in pounds, per month. Bigger team? Talk to us.

Does £5 pay off? Here is the maths.

Your AI bill
$1,000
a month, in US dollars
Benchmark saving
~$496
a month (50% less)
Halfly Starter
£5
a month (about $6.50)
Pays for itself
76×
over, every month

Example month using our Balanced benchmark (97.3% of prompts still at strong-model quality; cheap model at 6% of the strong one's price). AI bills are in dollars and our prices in pounds, so we convert at about $1.30 per £1. Your own number shows up in the free dashboard before you pay anything.

See your number free

Questions?

Straight answers, no small print.

Will my users get worse answers?

You decide. Set a quality target, for example 95% of answers as good as your strong model's, and Halfly only uses the cheap model while it can keep that promise. On our benchmark, asking for 95% delivered 96.1% at 58% lower cost. Halfly double-checks a sample of real answers so you can see the quality it actually delivers, and if anything goes wrong with the router, requests go to your strong model.

Can I try it without risking anything?

Yes, and it is free: no card, no sign-up. Without a paid plan Halfly runs in observe mode: every request still goes to your strong model, so your users see no change, and the dashboard shows what routing would have saved, at what checked quality. When you like the numbers, buy Starter (£5 a month), activate your key, and the savings switch on.

Does the double-checking cost money?

Yes, a little. Halfly re-asks the other model for about 2% of requests, at most 30 an hour, and a judge model scores the answers. That spend is shown on the dashboard and taken off the savings Halfly reports, so the savings you see are already net of it. Audits also pause when a budget cap is reached.

What is the “trained router”?

A small machine-learning model we trained on 104,000 real prompts, each labelled by whether a cheaper model answered it well. It reads a prompt in about 47 ms on a normal CPU and predicts the chance the cheap model is good enough. On 10,000 prompts it never saw, it beats RouteLLM's public router.

Which providers and models does it work with?

Anything that speaks the OpenAI Chat Completions API (OpenAI, Azure OpenAI, Groq, Together, OpenRouter, Ollama, vLLM) plus Anthropic Claude through its official SDK. You pick one cheap and one strong model and set their prices.

Do you see or store my prompts?

No. Halfly runs on your own servers, so prompts never come to us. By default it does not even write prompt text to its own log; it records only costs and routing decisions. Each API key gets its own cache, so customers never see each other's answers. A paid licence checks in with us about once a day, and it sends only the licence key: no prompts, no usage data.

How is this different from RouteLLM or OpenRouter?

RouteLLM is research code for routers; Halfly is a ready-to-run proxy with a router that scores higher on the same test, plus caching, prompt compression, fallback and a savings dashboard. OpenRouter is a hosted marketplace for many models; Halfly runs next to your app, on your own servers, in front of whichever providers you already use.

How much does it cost?

Free to install and try: observe mode, the savings dashboard and budget caps cost nothing. Starter is £5 a month and switches the savings on (routing with the quality dial, exact cache, fallback, dashboard and reports). Pro is £10 a month and adds self-learning, cost and quality per feature, a weekly savings report with budget alerts, and prompt compression. Cancel any time: if you stop paying, your app keeps working and Halfly goes back to free observe mode.

Where do the numbers on this page come from?

From held-out test sets the models never saw while training: the RouteLLM gpt4_dataset for routing and SQuAD v2 for compression. We share the raw metrics and the test scripts with any team evaluating Halfly. Your own savings depend on your models and traffic, which is why Halfly logs real costs per request and starts in observe mode.

Ready to stop overpaying for AI?

See your savings free. Switch them on for £5 a month. Cancel any time.

Halfy, the Halfly mascot, smiling