https://api.tokios.com — no inbound ports, no VPN.
Run it locally with Ollama
Phi-4 (14B) is in the Ollama library. Pull and run it:ollama run phi4-mini. See the Ollama library page for the full tag list — this page covers connecting it, not every runtime detail.
Ollama’s default context window is small (2048 tokens) — well below what Phi-4 supports natively. Raise
num_ctx in your Modelfile or client request to use more context, especially on the mini model’s 128K window.Variants & tags
Every value below is from the model cards on Hugging Face and the Ollama library. Tags and download sizes change as new quantizations ship — confirm against ollama.com/library/phi4 and ollama.com/library/phi4-mini before you standardize on one.
Sources: ollama.com/library/phi4, ollama.com/library/phi4-mini, microsoft/phi-4 model card, microsoft/Phi-4-mini-instruct model card, microsoft/Phi-4-multimodal-instruct model card.
Quantization & formats
Ollama’s default tags areGGUF Q4_K_M. The library also publishes -q8_0 and -fp16 for both phi4 and phi4-mini. Which format you can run depends on your hardware — see Quantization formats and the hardware they need for the full matrix, and what quantization is for how to read the Q4_K_M-style names.
Hardware fit
Comfort at roughlyQ4 for a modest context length. Treat every entry as an estimate — the ground truth is the actual GGUF size plus the KV cache for your context. See what size model fits your GPU? for the sizing math.
Run it — beginner to advanced
- Ollama (easiest)
- LM Studio (GUI)
- Transformers (advanced)
- vLLM (advanced)
http://127.0.0.1:11434. Raise num_ctx to use more context, and swap in phi4-mini for a lighter footprint.Capabilities
- Reasoning: The instruct models covered here answer directly — no
<think>block. Microsoft ships separatephi4-reasoningandphi4-mini-reasoningcheckpoints (see the tip above) that emit explicit<think>…</think>chain-of-thought for math-heavy tasks; pull those instead if you want that behavior. - Tool-calling: Phi-4 (14B) has no tool role in its chat template — don’t rely on structured function calls from it. Phi-4-mini and Phi-4-multimodal support it: wrap your tool definitions in
<|tool|>...<|/tool|>inside the system message, per their model cards. - Vision and audio: Only Phi-4-multimodal. It accepts text, image, and audio in the same prompt (
<|image_1|>,<|audio_1|>placeholders) and is not available as an Ollama tag — run it via Transformers or vLLM. - Long context: Phi-4 (14B) is limited to 16,384 tokens. Phi-4-mini and Phi-4-multimodal both support 131,072 tokens.
Connect it with Tokios
Once Phi-4 is running locally, pair the Tokios connector so you can reach it ashttps://api.tokios.com from Claude Code, Cline, or any other compatible client — instead of only from localhost:11434.
1
Pair the Tokios connector
Sign in at tokios.com/console, open the Setup tab, and click Start pairing to get a one-time claim code (Then approve the device on the Setup or Connectors tab.
TKS-XXXX-XXXX). Install and run the connector on the machine running Ollama:Windows
macOS
Linux
2
Point the connector at Ollama's /v1 API
Ollama exposes an OpenAI-compatible surface at
/v1. For a single-model setup, the console’s Setup wizard fills this in automatically as http://127.0.0.1:11434/v1. For multiple models, set it explicitly in tokios-connector.json — see Connector config.3
Register a deployment
In the Models tab, register the model and choose a public deployment name, for example
phi-tunnel. This name — not Ollama’s local model id — is what clients send in the model field.4
Create an API key
In the Keys tab, click Create key. Copy the
sk-tok-… key now — it’s shown only once.Call it from anywhere
Caveats
- Phi-4 (14B) tops out at a 16,384-token context window — much shorter than most current open models. If you need long context on a Phi model, use
phi4-mini(131,072 tokens) instead. - Phi-4 (14B) has no tool-calling support in its chat template. Reach for
phi4-miniif your workflow needs function calls. - Phi-4-multimodal isn’t on Ollama — you’ll need Transformers or vLLM (with
trust_remote_code) to serve its vision/audio capabilities locally. - Reasoning-tuned variants (
phi4-reasoning,phi4-mini-reasoning) are separate model pulls, not a mode switch on the instruct models covered here.
Quickstart
Pair a connector and register your first model end to end.
What size model fits your GPU?
Match Phi-4 to your available VRAM before you pull it.
Quantization & hardware
Which of Phi-4’s
GGUF formats runs on your hardware.Which local model for which task?
See how Phi-4 compares to other local models by task.