LanternDownload

Build AI apps.
Skip the inference bill.

Lantern is a local inference server that works with your existing AI setup. Keep building with the AI SDK while requests use Apple Intelligence or each person's own Codex or Claude subscription. No shared API key or inference bill.

Works with theVercel AI SDKand runs onApple IntelligenceorCodexorClaude

Build it, share it, and let everyone bring their own AI.

Normally, shipping even a small AI app means holding an API key and paying for every request your users make. With Lantern, there is no shared key: you develop against your own subscription, and each user's requests run on theirs.

Build

Add Lantern's provider to your AI SDK routes and develop against Apple Intelligence, Codex, or Claude on your own Mac.

Share

Deploy your app anywhere and send the link to friends, testers, or your team. There's no API key to protect and no inference bill waiting for you.

Everyone brings their own AI

Each person installs Lantern once and approves your app. Their requests use their on-device Apple model or their own subscription — not your API key.

Your existing AI setup, unchanged.

In a Next.js app, add a connection route, a Connect Lantern button, and Lantern's AI SDK provider. After a user connects, lantern.server(request) returns a provider that sends the request to the selected model on their Mac.

Lantern supports text, streaming, cancellation, native client-defined tools, and Codex-backed image generation and edits. Structured response formats aren't supported yet.

Follow the complete integration guide
app/api/ask/route.ts
const local = lantern.server(request);

const result = await generateText({
  model: local.provider(local.model),
  prompt: "Explain tomorrow's forecast.",
});

Your users install Lantern once. It handles the rest.

Lantern is a Mac menu bar app. It needs macOS 14 and Node.js 22 or newer, plus Apple Intelligence on a supported Mac or a signed-in Codex or Claude CLI.

Read the user setup guide
Lantern's lit and unlit connection dialog inside a Tiny Weather demo app
In your appOne connection interface, with honest live status.

The lamp lights when the app can reach Lantern on their Mac.

Lantern's native macOS menu showing Codex and an approved app
On their MacThe menu bar shows providers and approved apps.

Stopping Lantern pauses every approved site at once.

Lantern's local approval page naming Tiny Weather and its localhost origin
Before the first requestUsers approve your app by name and exact address.

One approval covers later requests from that address while Lantern is running.

Lantern's live demo page ready to connect to Lantern on this Mac
Try the whole flow on the demo page.

It connects this site to Lantern on your Mac and streams back a real Apple Intelligence, Codex, or Claude answer.

Each request goes from your server to the user's Mac, then to their selected model and back.

Your server signs the request, Lantern's relay routes it to the connected Mac, and Lantern verifies your app before starting the model adapter and streaming the reply back.

Read the request and security details
Your serverSigns the request
Lantern relayRoutes it to Lantern on their Mac
Lantern on their MacVerifies the app and starts the model
Apple IntelligenceCodexClaude
Apple inference and provider logins stay on their Mac. The web request does not.

Prompts and replies pass through your server and Lantern's relay. Codex and Claude requests continue to their online provider. Users should approve only sites they trust.

Built for sharing, not for scale.

Lantern isn't hosting infrastructure. There's no pooled key and no reselling of inference — every request runs on one person's own account, within their own limits, under their provider's normal terms. That makes it the easiest way to put a hobby project, a prototype, or an early startup idea in front of real people. When you outgrow it, swap Lantern's provider for a paid API key and everything else stays the same.

Start building with Lantern.

Open the integration guide