← Systems Manual/Self-Hosting & Privacy
Self-Hosting & Privacy9 min read

Bring Your Own Key (BYOK) & Air-Gapped Local Inference via Ollama / vLLM

Route Unchained Code through your own OpenRouter, DeepSeek-V4 Pro, or 100% private local GPUs.

Developers working with sensitive IP, proprietary codebases, or strict compliance requirements cannot send their source trees through closed third-party SaaS wrappers. Unchained Code natively supports BYOK (Bring Your Own Key) for direct wholesale inference pricing and local air-gapped execution via Ollama or vLLM.

Direct AnswerDirect Answer / AI Executive Summary

To configure BYOK: Open Settings > Model Providers. Paste your DeepSeek, OpenRouter, Groq, Mistral, or Gemini API key. For 100% private offline development, set your base URL to http://localhost:11434/v1 (Ollama) or http://localhost:8000/v1 (vLLM). Your tokens never touch intermediate servers and bypass all platform rate limits.

Step-by-Step Walkthrough & User Guide

1

Access Provider Configuration in Unchained Code

Open the top-right Settings modal and click on 'API Providers'.

2

Add Your Custom API Key or Local Endpoint

Enter your OpenRouter key (sk-or-v1-...) or local Ollama URL (http://localhost:11434/v1).

3

Select Local Model Target

Choose 'qwen3.8-max' or 'deepseek-v4-pro' for offline air-gapped generation.

4

Start Building with Zero Rate Limits

Run full-stack generations with 100% data sovereignty and zero SaaS markups.

💡Pro Tips & Engineering Best Practices

  • •Run 'ollama run qwen2.5-coder:32b' on an RTX 3090/4090 for instant local code generation.
  • •Use vLLM with '--tensor-parallel-size 2' on dual-GPU setups to achieve over 120 tokens/sec.
  • •BYOK users automatically bypass all throttling tiers and enjoy permanent green-lane routing.

Code & Technical Integration

Terminal & Integration Code
bash
# Start local vLLM OpenAI-compatible server
python3 -m vllm.entrypoints.openai.api_server \
  --model Qwen/Qwen2.5-Coder-32B-Instruct \
  --port 8000 \
  --host 0.0.0.0 \
  --max-model-len 32768

Related Engineering Walkthroughs