Anthropic-compatibleDeveloper Mode required

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

Setup (4 steps)

1

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.

Note: Developer Mode is hidden by default. If you don't see it, make sure you're on the latest Claude Desktop release.
2

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.

3

Enter MegaBrain Gateway credentials

Set the Backend to Gateway (Anthropic-compatible), then fill in the three fields:

Gateway base URLhttps://getmegabrain.com/api/anthropic

No trailing /v1 — Claude Desktop appends it automatically.

Gateway API keymb-••••••••••••••••

Your MegaBrain API key from the profile page.

Gateway auth schemebearer

MegaBrain uses standard Bearer token auth.

Click Apply locally.

4

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 tier

Troubleshooting

"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.