https://api.tokios.com, and your tools, teammates, or agents call one authenticated endpoint from anywhere.
Xinference exposes an OpenAI-compatible Chat Completions API, so it works with Tokios like any OpenAI-compatible server: the connector forwards to whatever
/v1 BaseUrl you set, regardless of which server implements that surface. Ollama, llama.cpp, vLLM, and LM Studio are the backends Tokios documents most closely, but anything OpenAI-compatible — including Xinference — works the same way.The outbound-only way
1
Run Xinference locally, as usual
Start the local Xinference server — for example with Xinference commonly serves its OpenAI-compatible API on port
xinference-local — and launch a model through its UI or CLI. The exact startup command and flags can vary by version, so check yours.9997 — confirm the default port for your install. Keep it bound to 127.0.0.1 rather than 0.0.0.0, and don’t forward the port on your router.2
Pair the Tokios connector
Sign in at tokios.com/console, open the Setup tab, and click Start pairing. Tokios shows a one-time claim code like Already have Back in the console, approve the device on the Setup or Connectors tab. The connector’s token is delivered over the tunnel once approved — you never see it on screen or paste it into a file.
TKS-XXXX-XXXX, valid for about 15 minutes.On the machine running Xinference, run the install one-liner for your OS:Windows
macOS
Linux
tokios-connector installed? Pass the code directly instead:3
Point the connector at Xinference's /v1 API
For the basic single-model path, the console’s Setup wizard asks for your upstream base URL — enter Xinference’s OpenAI-compatible endpoint, Confirm
http://127.0.0.1:<port>/v1 (confirm the port against your install). If you’re serving multiple models through a tokios-connector.json config, set the upstream BaseUrl explicitly:9997 against your running Xinference instance before using it. See Connector config for the full multi-model file format.4
Register a deployment
In the Models tab, register the Xinference model and choose a public name — for example,
xinference-tunnel. That public name, not the model id you launched in Xinference, is what clients send in the model field.5
Create an API key
In the Keys tab, click Create key. Optionally scope it to specific deployments with model-name patterns (comma-separated globs,
* for all). Copy the sk-tok-… key now — it’s shown only once.Use it from anywhere
Once you have a deployment name and an API key, any OpenAI- or Anthropic-compatible client can reach your Xinference model — from another machine, a teammate’s laptop, or a hosted agent.FAQ
Is Xinference officially supported?
Is Xinference officially supported?
Ollama, llama.cpp, vLLM, and LM Studio are the backends Tokios documents most closely. But the connector works against any server exposing an OpenAI-compatible Chat Completions API at a
/v1 base URL, and Xinference does that, so it works as a generic OpenAI-compatible upstream the same way. Confirm behavior against your own Xinference version before relying on it in production.Does streaming work?
Does streaming work?
Yes, if the underlying Xinference model and server support streaming responses. Set
"stream": true and Tokios returns standard server-sent events (SSE) in OpenAI or Anthropic format, depending on which API surface you called.Can I serve more than one Xinference model?
Can I serve more than one Xinference model?
Yes. Register additional deployments in the Models tab, or use a
tokios-connector.json config file to define multiple upstreams and routes for a single connector — useful if you launch more than one model in Xinference. See Connector config.Your model never leaves your machine — your endpoint works everywhere
Xinference keeps doing exactly what it does today, on localhost, with no inbound ports and no endpoints exposed beyond/v1. The connector only dials out. Everything past that — auth, routing, streaming — is one endpoint you can call from any machine, teammate, or agent you choose to give a key to.
Supported backends
See which local runtimes Tokios explicitly tests and supports today.
API keys
Create, scope, and rotate
sk-tok-… keys for teammates and agents.