Claude Desktop + MegaBrain Gateway
Claude Desktop supports third-party inference via its built-in Gateway mode. Point it at MegaBrain to use GPT-4o, Gemini 2.5 Pro, Llama 4, DeepSeek R1 and 500+ other models — all inside the Claude UI, with one API key and unified billing. Models load automatically — no manual list required.
500+ models auto-discovered
Claude Desktop fetches the full model list from MegaBrain on startup — no manual entry.
No markup
Exact provider rates. What Anthropic charges, you pay.
Unified billing
One balance covers Claude Desktop, Claude Code, and your own apps.
Prerequisites
- Claude Desktop (latest) — claude.ai/download
- A MegaBrain API key — getmegabrain.com/profile
Setup (4 steps)
Enable Developer Mode
In Claude Desktop menu bar, go to Help → Troubleshooting and click Enable Developer Mode. A new Developer menu will appear in the menu bar.
Open Third-Party Inference settings
From the menu bar choose Developer → Configure Third-Party Inference. A panel will open with a Backend dropdown and credential fields.
Enter MegaBrain Gateway credentials
Set the Backend to Gateway (Anthropic-compatible), then fill in the three fields:
https://getmegabrain.com/api/anthropicNo trailing /v1 — Claude Desktop appends it automatically.
mb-••••••••••••••••Your MegaBrain API key from the profile page.
bearerMegaBrain uses standard Bearer token auth.
Click Apply locally.
Restart and connect
Fully quit Claude Desktop (⌘Q on Mac, Alt+F4 on Windows) and reopen it. On the start screen choose Continue with Gateway.
Claude Desktop will automatically call GET /v1/models and populate the model picker with all 500+ models available on MegaBrain — no manual list needed.
Popular models to try
All of these appear automatically in the model picker after connecting. Use the MegaBrain leaderboard to browse the full catalogue and compare by benchmark score, context, and price.
anthropic/claude-opus-4-8 # Strongest reasoning
anthropic/claude-sonnet-4-6 # Best daily driver
openai/gpt-4o # Fast + multimodal
google/gemini-2.5-pro # Largest context
deepseek/deepseek-r1 # Best open-source
meta-llama/llama-4-maverick # Free tierTroubleshooting
"Gateway" option not appearing
Developer Mode must be enabled first (Step 1). If you don't see the Developer menu, update Claude Desktop to the latest version.
Double /v1/v1/ in the URL
Do not append /v1 to the base URL. Correct: https://getmegabrain.com/api/anthropic — Claude Desktop adds /v1 itself.
Model picker is empty after connecting
Make sure the base URL has no trailing slash and no /v1 suffix. Restart Claude Desktop fully (⌘Q, not just close the window) and try again.
Connection works locally but not in cloud/Cowork
Claude Code's cloud sessions run on Anthropic infrastructure and cannot reach your custom gateway. Local sessions (running on your Mac) work fine.
Model returns an error after selection
Check that the model ID is correct — it must match exactly what MegaBrain expects (e.g. anthropic/claude-sonnet-4-6). Verify your key has sufficient balance.