LanternDownload

Build AI apps.
Skip the inference bill.

Lantern is a local inference server that works with your existing AI setup. You keep building with the AI SDK — but requests run through each person's own Codex or Claude subscription. No API keys, no metering, nothing to pay per token.

Works with theVercel AI SDKand runs onCodexorClaude

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 the Codex or Claude CLI already signed in 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 run on their own subscription and their own limits — not yours.

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 through the CLI on their Mac.

Lantern supports text, streaming, cancellation, and Codex-backed image generation and edits. Client-defined tools and 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 or newer, Node.js 22 or newer, and 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 Codex or Claude answer.

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

Your server signs the request, Lantern's relay routes it to the connected Mac, and Lantern verifies your app before starting the CLI 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 CLI
CodexClaude
Their provider login stays on their Mac. The request does not.

Prompts, attached images, and replies pass through your server, Lantern's relay, and the provider's online service. 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