sk-tok-… key. No tunnel to babysit, no unauthenticated port on your machine.
This works the same way across JetBrains IDEs that ship AI Assistant — IntelliJ IDEA, PyCharm, GoLand, WebStorm, Rider, and others.
Prerequisites
- A running Tokios connector paired with your local model — see Connector install
- A registered model deployment name — see Register a model
- A Tokios API key (
sk-tok-…) — see API keys - A JetBrains IDE with the AI Assistant plugin installed
Point AI Assistant at Tokios
1
Open AI Assistant's provider settings
Open Settings | Tools | AI Assistant | Providers & API keys. JetBrains has moved this setting between releases, so confirm the exact menu path and label for your installed AI Assistant version.
2
Find the OpenAI-compatible endpoints section
Look for the OpenAI-compatible endpoints section, used for third-party OpenAI-compatible servers — the exact field labels shown here can vary by version, so check yours.
3
Enter the Tokios URL
Set the endpoint URL to:
4
Paste your Tokios API key
Paste your
sk-tok-… key into the API key field for this endpoint. AI Assistant sends it as a Bearer token on every request.5
Add your deployment as the model
Enter the public deployment name you registered in the Models tab — for example,
gemma-tunnel — as the model for this endpoint. This is the value AI Assistant sends in the model field; it is not Ollama’s, llama.cpp’s, vLLM’s, or LM Studio’s local model id.6
Toggle tool calling if you need it
If AI Assistant exposes a toggle for tool/function calling on this endpoint, enable it. Whether the model actually acts on tool calls depends on the underlying model itself.
Replace
gemma-tunnel with the deployment name you registered, and sk-tok-YOUR_KEY with your own key. Never commit either into a shared config file.A custom endpoint does not power every AI Assistant feature. As of the 2026.1 releases, JetBrains documents third-party and local models as working in AI Chat, while Junie and next-edit suggestions still require JetBrains’ cloud models. Expect chat to switch over and inline suggestions to stay on the built-in provider.
Why this beats a bare tunnel
Without something in front of it, a local model server only listens onlocalhost or your LAN, and JetBrains’ cloud-hosted AI Assistant backend can’t reach either. A raw tunnel (for example ngrok) can expose the port, but it typically leaves the model listening with no authentication behind a URL that changes on every restart.
Tokios’s connector is outbound-only, so your model never opens an inbound port, and every request to it carries a scoped sk-tok-… key:
- No unauthenticated exposure — the connector dials out to Tokios; it never listens on a port, and requests need a valid key.
- Stable URL —
https://api.tokios.com/v1doesn’t change between restarts, so you set it in AI Assistant once. - Scoped keys — a key can be limited to specific deployments and revoked instantly if it leaks, without touching your local model or connector.
Troubleshooting
401 error
401 error
The API key AI Assistant sent is missing, malformed, or has been revoked. Confirm you pasted the full
sk-tok-… key with no extra whitespace, and check its status on the Keys tab.404 error
404 error
The
model value AI Assistant sent doesn’t match a registered deployment. Confirm the model name you entered in AI Assistant exactly matches the public name on the Models tab — not your Ollama/llama.cpp/vLLM/LM Studio local model id.503 error
503 error
The connector for that deployment is offline or at its concurrency cap. Check the Connectors tab — the connector needs to show as Online, and the machine running it needs to still be up and reachable.
Next steps
Quickstart
Set up the connector, register a model, and create a key from scratch.
Compatible clients
See base URL and key setup for other OpenAI- and Anthropic-compatible clients.