localhost:11434 or localhost:8000. That’s fine for you, but your team, your apps, and your remote clients can’t reach it. You need a local LLM API (also written as locallm API) — an authenticated, OpenAI-compatible endpoint that lets anyone with an API key call your local model from anywhere.
This guide covers what a local LLM API is, the options for creating one, and how to set up team access with per-user authentication and model scoping.
Last verified: 2026-10-24
The API gap
When you run a model with Ollama, vLLM, llama.cpp, or LM Studio, you get a local API on127.0.0.1:PORT/v1. That works for the machine running the model, but it doesn’t solve:
- Remote access — your team can’t reach
127.0.0.1from their laptops - Authentication — the runtime has no per-user auth (or a single shared key)
- Model scoping — everyone has access to every model, or no one does
- Networking — port forwarding, Tailscale, Cloudflare Tunnel, CGNAT
- A public endpoint (e.g.,
https://api.tokios.com/v1) that routes to your local model - Per-user API keys with model scoping
- Outbound-only tunneling (no inbound ports)
- OpenAI-compatible interface (any OpenAI SDK works)
What is a local LLM API?
A local LLM API is an API layer that exposes your locally-running language models to remote clients through an authenticated, OpenAI-compatible endpoint. It typically includes:- Authentication — API keys (
sk-tok-…or similar) that identify each user or app - Authorization — model scoping (who can access which models)
- Routing — mapping public deployment names to upstream model ids
- Protocol translation — converting between different API formats if needed
- Tunneling — connecting your local runtime to the public endpoint without inbound ports
https://api.tokios.com/v1 with their API key and the deployment name (e.g., team-llama), and the request routes through the tunnel to your local model.
Options for exposing local models
Raw runtime API
Ollama, vLLM, llama.cpp, and LM Studio all expose an OpenAI-compatible/v1 API on localhost. This is the simplest option, but it has limitations:
- No authentication (Ollama) or single shared key (vLLM, llama.cpp, LM Studio)
- Localhost only — no remote access without additional networking
- No model scoping — everyone has access to every model
- No per-user tracking — can’t tell who’s making requests
LiteLLM
LiteLLM is an open-source proxy that provides an OpenAI-compatible API for 100+ LLMs (local and cloud). It’s a popular choice in the r/LocalLLaMA community. Strengths:- Multi-provider routing (local + cloud in one endpoint)
- OpenAI-compatible interface
- Load balancing and fallback
- Active community
- Proxy model — your client calls LiteLLM, LiteLLM calls the runtime. Both need to be reachable.
- No built-in tunneling — you still need to solve networking (Tailscale, Cloudflare Tunnel, etc.)
- Single shared API key (no per-user auth out of the box)
- Self-hosted — you run the proxy server
LocalAI
LocalAI is a self-hosted, OpenAI-compatible API server that supports multiple model formats and modalities (text, images, audio, video). Strengths:- Broad modality support (text, images, audio, video)
- OpenAI-compatible interface
- Self-hosted, privacy-focused
- Active development
- Self-hosted — you run the server
- No built-in tunneling — you still need to solve networking
- Single shared API key (no per-user auth)
- More complex setup than Ollama or vLLM
Tokios
Tokios is a tunnel + API gateway designed specifically for team access to local models. It provides:- Outbound-only tunnel — the connector dials out, so no inbound ports, no port forwarding, no Tailscale required. Works behind CGNAT, corporate firewalls, and NAT.
- Per-user API keys — each teammate gets their own
sk-tok-…key, scoped to specific models - Model routing — serve multiple models (Ollama, vLLM, llama.cpp) through one endpoint
- OpenAI-compatible endpoint —
https://api.tokios.com/v1works with any OpenAI SDK - Managed infrastructure — no proxy server to run, no tunnel to configure
- Purpose-built for team access to local models
- No networking headaches (outbound-only tunnel)
- Per-user authentication and model scoping
- Works behind CGNAT (Starlink, 5G, apartment ISPs)
- Managed service — no infrastructure to maintain
- Requires internet access (the tunnel needs outbound connectivity)
- Not suitable for air-gapped environments
- Managed service (not self-hosted)
Comparison matrix
Setting up a local LLM API with Tokios
1
Install the connector on your model host
On the machine running your model (Ollama, vLLM, llama.cpp, LM Studio), install the Tokios connector:Get your one-time claim code
Linux
TKS-XXXX-XXXX from the dashboard Setup tab.2
Claim the connector and point it at your runtime
In the dashboard, approve the device. Then configure the connector to point at your runtime’s local API:
- Ollama:
http://127.0.0.1:11434/v1 - vLLM:
http://127.0.0.1:8000/v1 - llama.cpp:
http://127.0.0.1:8080/v1 - LM Studio:
http://127.0.0.1:1234/v1
3
Register your models as deployments
On the Models tab, map each upstream model id (e.g.,
llama3.1) to a public deployment name (e.g., team-llama). Clients send the deployment name in the model field.4
Create API keys for your team
On the Keys tab, create a key for each teammate. Scope each key to specific deployments. Share the key and the endpoint URL (
https://api.tokios.com/v1) with your team.Client integration examples
FAQ
Can I use any OpenAI-compatible client?
Can I use any OpenAI-compatible client?
Yes. Any client that speaks the OpenAI
/v1 API works — Python SDK, JavaScript SDK, curl, Continue, Cline, Open WebUI, Cherry Studio, and many more. See Compatible clients for the full list.What about streaming responses?
What about streaming responses?
Tokios handles streaming correctly. Set
"stream": true in your request and the response streams token-by-token. Some tunnel solutions (Cloudflare Tunnel) have SSE buffering issues that break streaming — see Tunnels and streaming for details.Can I serve multiple models?
Can I serve multiple models?
Yes. Register multiple deployments (e.g.,
team-llama, team-qwen, team-coder) and route them to different upstream models. You can even serve models from different runtimes (Ollama + vLLM + llama.cpp) through the same endpoint. See Model routing.How do I handle authentication?
How do I handle authentication?
Tokios provides per-user API keys. Create a key for each teammate, scope it to specific models, and share it securely. You can revoke any key without affecting others. See API keys for full details.
What's the difference between a local LLM API and a cloud API?
What's the difference between a local LLM API and a cloud API?
A local LLM API exposes your locally-running models to remote clients. The model runs on your hardware, your data stays on your network, and you control the infrastructure. A cloud API (OpenAI, Anthropic) runs the model on their servers — you send data over the internet, they run inference, and you pay per token.
Can I use this with LiteLLM or LocalAI?
Can I use this with LiteLLM or LocalAI?
Tokios is an alternative to LiteLLM and LocalAI, not a complement. If you’re already using LiteLLM or LocalAI, you can replace them with Tokios for simpler team access. If you need multi-provider routing (local + cloud), you can use Tokios alongside LiteLLM — see Tokios vs LiteLLM.
Next steps
- Team access to local models — full walkthrough for giving your team API access
- API keys reference — scoping, sharing, and revocation
- Model routing — serve multiple models through one endpoint
- Tokios vs LiteLLM — detailed comparison
- Compatible clients — find your client