Docs
Biyan Desktop
Remote API Gateway

Remote API Gateway

Biyan can expose configured cloud providers through a local OpenAI-compatible endpoint. The server runs on your device, but inference remains remote: requests are forwarded to the provider selected by the model mapping.

⚠️

This is not a local inference server. Biyan never starts llama.cpp, MLX, Foundation Models, or another local model backend.

Quick start

Configure a provider

Add credentials under Settings → Model Providers and verify a normal chat works.

Start the gateway

Open Settings → API Gateway, choose a loopback host and port, set an API key, and start the gateway. Keep the default 127.0.0.1 binding unless you understand the network exposure.

Send a request


curl http://127.0.0.1:1337/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_LOCAL_GATEWAY_KEY" \
-d '{
"model": "YOUR_CONFIGURED_REMOTE_MODEL",
"messages": [{"role": "user", "content": "Hello"}]
}'

Security

  • Use a different local gateway key from every provider API key.
  • Prefer 127.0.0.1; binding to 0.0.0.0 exposes the service to the network.
  • Provider credentials stay in Biyan and are not returned to gateway clients.
  • Requests, attachments, and tool results are still processed by the selected cloud provider.

Retired local-model routes return HTTP 410 with code LOCAL_RUNTIME_REMOVED. They do not download a model or start a backend.