Share a Model

The model on your computer, from anywhere: your phone, your box, a friend. A tunnel gives it an address on the internet, behind a password.

Share one from anywhere

lnk tunnel open qwen3 --name qwen --auth friend:secret
curl -N -u friend:secret https://qwen.<you>.local.link/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{"model":"qwen3","stream":true,"messages":[{"role":"user","content":"hi"}]}'

The tunnel takes the same llm or model name, --model and --upstream, plus its own flags (Tunnel). Use --auth: an open model endpoint is costly to abuse, and programs can't sign in through --github. Tokens stream as they're generated. Open the URL in a browser for ready-to-run commands. If the model isn't installed, lnk tunnel open offers to install it.

Choose who can use it

With --auth, only whoever has the password; without it, anyone with the URL, which costs your computer's time and power. More ways to let people in: Tunnels. What a shared model exposes, and what it doesn't: Security.

Stop sharing

The tunnel stays open until you stop the lnk tunnel open command, with Ctrl-C. Its URL then stops answering. lnk tunnel status lists the tunnels open on all your computers.

Troubleshooting

SymptomFix
An OpenAI SDK gets 401 through --authSend a Basic header (below).
/api/... returns 404Only /v1 is served, on purpose.

OpenAI SDKs send their own Authorization: Bearer. Through a tunnel with --auth, pass the password as a Basic header instead:

from base64 import b64encode
from openai import OpenAI

client = OpenAI(
    base_url="https://qwen.<you>.local.link/v1",
    api_key="unused",
    default_headers={"Authorization": "Basic " + b64encode(b"friend:secret").decode()},
)