Documentation Index
Fetch the complete documentation index at:https://docs.llmrouter.app/llms.txt Use this file to discover all available models, tags, and features before exploring further.
OpenCode Integration
OpenCode is a fast and intuitive terminal-based AI coding assistant. It helps developers generate code, debug, refactor, explain code, and build features directly from the command line. By connecting OpenCode to LLM Router, you can access top models from Anthropic, OpenAI, Google, xAI, and others through a single unified endpoint while gaining intelligent routing, Skills, context optimization, and privacy features.Configuring OpenCode with LLM Router
1. Start OpenCode
Open your terminal and run:2. Connect to LLM Router
In the OpenCode interface, run the connect command:- Select OpenAI Compatible (or Custom Provider)
- Base URL:
https://api.llmrouter.app/v1 - API Key: Paste your LLM Router API key (
sk_llmr_...)
3. Select a Model
Run the following command to choose a model:anthropic/claude-opus-4.6anthropic/claude-sonnet-4.6openai/gpt-5.4google/gemini-3.1-proxai/grok-4.20
4. Configure Routing via LLM Router Dashboard (Recommended)
For the best experience, set up your routing preferences in the LLM Router Dashboard:- Assign tags like
coding,testing,ui design,refactoring, etc. - Enable relevant Skills
- Turn on Zero Data Retention (ZDR) for sensitive projects
- Configure default model preferences and optimization settings
5. (Optional) Advanced Configuration
You can create a configuration file namedopencode.json for more control:
Start Using OpenCode
Once connected, you can start coding with natural language prompts:Benefits
- Access to the best models with automatic routing
- Automatic relevant Skill injection
- Zero Data Retention for private codebases
- Reduced costs through context optimization