Claude Desktop with a Third-Party API: 3P Gateway Setup, Limits and FAQ
As of 2026-10-07, Claude Desktop can use a third-party API, but only one kind: a gateway that implements the Anthropic Messages API. The official docs frame it as a way to use Claude models, and model discovery shows only Claude models. The entry point is developer mode: Help → Troubleshooting → Enable Developer Mode, then Developer → Configure Third-Party Inference, where you set the inference provider to Gateway and enter a base URL and key. The desktop app does not read the Claude Code CLI's ANTHROPIC_BASE_URL or settings.json, and GPT cannot be connected. This page lays out the steps, how it differs from Claude Code, and common questions, based on Anthropic's official docs and the QCode docs.
Updated 2026-10-08
Four things to know before you start
The inference provider to pick
In the Connection section of the Configure Third-Party Inference window, set Inference provider to Gateway, then fill in Gateway base URL, Gateway API key and the auth scheme. Per the official docs, the window validates values as you type and can test the connection against your endpoint.
What the gateway must implement
The official requirement is the Anthropic Messages API: POST /v1/messages with streaming and tool use is required. GET /v1/models is optional; if the gateway implements it, models are discovered for you, and if not, you list them in inferenceModels.
Which models you can pick
The official gateway page is about using Claude models on a gateway, and model discovery shows only models whose IDs are recognizably Claude. The QCode docs state that GPT models cannot use the Anthropic endpoint, so GPT does not work in the desktop app.
Desktop and CLI each read their own
The desktop app reads its gateway settings from its own third-party inference configuration, not from ANTHROPIC_BASE_URL or settings.json. The Claude Code CLI is the opposite: it reaches a gateway through environment variables or a settings file.
What 3P mode in Claude Desktop is
As of 2026-10-07, connecting Claude Desktop to a third-party API goes through a deployment mode Anthropic calls Claude Desktop on 3P: all model inference is sent to a provider you configure, which can be Google Cloud's Agent Platform, Amazon Bedrock, Microsoft Foundry, a compatible gateway you operate, or the Anthropic API itself. The official architecture table spells out the differences: standard Claude Desktop sends inference to the Anthropic API, while 3P mode uses your configured endpoint; the web application is bundled inside the app instead of loading from claude.ai; user identity is the local device only (unless managed from the claude.ai admin console); conversations are stored on the local disk. Anthropic says 3P mode keeps Chat, Cowork and Code, with inference and billing handled by the provider you choose (whether Cowork works through QCode is not verified on this page). It is designed for organizations whose security, regulatory or contractual requirements keep them from sending data through Anthropic's first-party products; a single machine can also be configured directly in the app, a path the docs describe for evaluation, pilots, or organizations without MDM.
Recent changes in the official docs (as of 2026-10-07)
As of 2026-10-07, the newest release in the Claude Desktop on 3P configuration changelog is v2.26454.0 (2026-10-06). Two points matter directly to gateway users. First, the official gateway page says that on versions earlier than v2.19675.0 (2026-10-01) a session assumes a 200K-token context window on the standard model entry for every model; newer versions assume 1M for models recognized as having a native 1M window and 200K for every other model ID. Second, Gateway auth scheme now takes only two values, bearer and x-api-key, with bearer as the default. The docs also ask gateways to preserve prompt caching: a gateway that strips cache_control, or changes the system prompt or tool list from one request to the next, makes every turn reprocess the whole conversation at full input-token cost. The QCode Claude Desktop setup page was last updated on 2026-09-25.
Timeline
Claude Desktop v1.3036.0 adds the Gateway auth scheme setting, so the gateway credential can be sent as an Authorization: Bearer header or an x-api-key header.
The QCode Claude Desktop setup page is updated; it states that it is based on the official third-party inference gateway docs, and the current version withdraws the claim that connecting QCode lets you use Cowork without Pro.
The steps and quotes on this page were checked against the official pages on this date; as of that day, the newest release in the official configuration changelog is v2.26454.0 (2026-10-06).
Confirmed vs not verified
Confirmed (verbatim in the official docs)
All of the following can be checked word for word in Anthropic's official docs or the QCode docs: the entry point is Help → Troubleshooting → Enable Developer Mode, then Developer → Configure Third-Party Inference; the gateway must implement the Anthropic Messages API, with POST /v1/messages supporting streaming and tool use, while GET /v1/models is optional; model discovery shows only Claude models; the auth scheme defaults to Bearer and can be switched to x-api-key; the desktop app does not read ANTHROPIC_BASE_URL or settings.json; Remote Control is unavailable while the gateway configuration is active; 3P mode has no mobile app, no claude.ai web access, no voice mode, no sharing between users and no sessions in Anthropic's cloud; 3P is token-based consumption with no seat licensing; on QCode, Claude models can only use the Anthropic endpoint, at https://api.qcode.cc/api.
Not verified, or the sources disagree
This page draws no conclusion on three things. First, Cowork: Anthropic says 3P mode keeps Chat, Cowork and Code, but the QCode docs have withdrawn the claim that connecting QCode lets you use Cowork without Pro and ask readers not to count Cowork as a QCode use case, so this page does not promise that Cowork works through QCode. Second, non-Claude models: the official docs say model discovery shows only Claude models, and the Claude Code gateway docs say Anthropic does not support pointing Claude Code at non-Claude models through any gateway, so this page gives no setup for other models in the desktop app. Third, web search, which is unverified: a footnote in the official feature table says gateways that do not forward Anthropic server tools need a web search provider configured first; the QCode docs do not describe how web search behaves in the desktop app, and this page has not verified whether it works through QCode.
How it differs from Claude Code Desktop and the Claude Code CLI
vs Claude Code Desktop
They are not two apps. The official docs say the Claude Desktop app has three tabs: Chat for conversations, Cowork for Dispatch and longer agentic work, and Code for software development; Claude Code Desktop is that Code tab. In 3P mode, Code runs the same Claude Code engine as the standalone CLI, inherits the desktop app's third-party inference configuration automatically, and uses the same provider, endpoint and credentials as Cowork sessions. So once the gateway is set up in the desktop app, the Code tab uses it too, with nothing extra to configure.
vs the Claude Code CLI
The configuration lives in a different place. The CLI reaches a gateway through ANTHROPIC_BASE_URL plus a credential variable (the QCode docs use ANTHROPIC_AUTH_TOKEN); the desktop app reads neither. The official docs say that while a gateway credential is active, requests carry it in place of the claude.ai subscription login and the subscription's usage limits don't apply; setting only ANTHROPIC_BASE_URL without a credential does not replace the subscription. Which to use: the docs suggest the desktop app for managing parallel sessions in one window, arranging panes side by side or reviewing changes visually, and the CLI for scripting, automation or a terminal workflow. The desktop app is interactive only, with no --print style output.
Six steps to connect a gateway in the desktop app
① Install Claude Desktop from claude.com/download and launch it without signing in or creating an Anthropic account. ② From the macOS menu bar (on Windows, the ☰ application menu in the top-left of the sign-in screen), choose Help → Troubleshooting → Enable Developer Mode; the app restarts with a Developer menu. ③ Choose Developer → Configure Third-Party Inference…, and in the Connection section set Inference provider to Gateway. ④ Enter the gateway address as Gateway base URL and the key your gateway issued as Gateway API key; leave Credential kind on the default Static API key and Gateway auth scheme on the default Bearer, switching to x-api-key only if your gateway requires it. ⑤ Models: if the gateway implements GET /v1/models, models are discovered for you; if not, list each full model ID your gateway accepts in inferenceModels under Models, and the first entry becomes the default model. ⑥ Click Apply Changes, then Save & Restart; after the relaunch the sign-in screen offers an option to start with this configuration. To go back to standard Claude Desktop, choose the Anthropic sign-in option on that screen.
On QCode
Per the QCode docs, fill in step ④ like this: Gateway base URL is https://api.qcode.cc/api (no /v1, no trailing slash; for networks in mainland China the docs recommend https://asia.qcode.cc/api), Gateway API key is a cr_ key created in the console, and the auth scheme stays on the default bearer. On QCode, Claude models can only use the Anthropic endpoint, so in the desktop app pick Claude models such as claude-sonnet-5-5, claude-opus-5-5 or claude-sonnet-5. GPT models cannot use the Anthropic endpoint; for GPT, use a client that supports the OpenAI protocol. The same key also works with the Claude Code CLI: set ANTHROPIC_BASE_URL to https://api.qcode.cc/api and ANTHROPIC_AUTH_TOKEN to your cr_ key. Billed per token; see /models for each model's price. Every request can be looked up at probe.qcode.cc by entering your key.
Frequently asked questions
Can Claude Desktop use a third-party or custom API?
Yes, but only a gateway that implements the Anthropic Messages API; the official docs frame it as a way to use Claude models, and model discovery shows only Claude models. As of 2026-10-07, Anthropic calls this Claude Desktop on 3P: open Configure Third-Party Inference in developer mode, set the inference provider to Gateway, and enter a base URL and key. The gateway must support POST /v1/messages with streaming and tool use. Standard Claude Desktop, outside 3P mode, sends inference to the Anthropic API.
Can I use GPT in Claude Desktop?
No. The official docs require the gateway to implement the Anthropic Messages API, and model discovery shows only Claude models; the QCode docs state that GPT models cannot use the Anthropic endpoint. For GPT on the desktop, the QCode docs advise picking a client that supports the OpenAI protocol.
I set ANTHROPIC_BASE_URL in settings.json. Why doesn't the desktop app use it?
Because the desktop app doesn't read it. The official Claude Code gateway docs say the desktop app reads its gateway settings from its own third-party inference configuration, not from ANTHROPIC_BASE_URL or settings.json; those two only affect the Claude Code CLI. To send the desktop app (including its Code tab) through a gateway, configure it under Developer → Configure Third-Party Inference. If that window is read-only, an administrator has distributed a configuration, and it takes precedence.
Do I still need a Claude account or a Pro subscription with a third-party gateway?
You don't sign in. The official single-machine steps say not to sign in or create an Anthropic account; once configured, the sign-in screen offers to skip Anthropic authentication and start with your provider configuration. The docs describe 3P as token-based consumption billed by your provider, with no seat licensing, and your use of the desktop app itself remains subject to Anthropic's Commercial Terms of Service. The trade-off is fewer features: in the official feature table, 3P mode has no mobile app, no claude.ai web access, no voice mode, no sharing between users and no sessions in Anthropic's cloud. To go back, choose the Anthropic sign-in option on the sign-in screen.
The model picker is empty, or I see Gateway was unreachable. What now?
Check the address first, then the model list. Per the official docs, Gateway was unreachable means the app couldn't reach the configured base URL at startup, so check the URL and network path. For an empty picker, the docs say to check your gateway's GET /v1/models response and your inferenceModels list: when /v1/models is unreachable or returns an error, the picker falls back to inferenceModels, and if that list is empty, so is the picker. The QCode docs add that the base URL must not end in a slash and the key must start with cr_ with no leading or trailing spaces; if the picker is still empty, list full IDs such as claude-sonnet-5-5 in inferenceModels yourself.
Can I run the desktop app and the Claude Code CLI at the same time, with one QCode key?
Yes. The official docs say the desktop app runs the same underlying engine as the CLI, and you can run both at once on the same machine, even on the same project. The QCode docs say each reads its own configuration, the desktop app its own and the CLI ~/.claude/settings.json, while sharing the same QCode API key without conflict. One caveat: the /desktop command that moves a CLI session into the desktop app requires signing in with a Claude subscription, and the docs say it is not available with API key authentication.
Sources
3P mode and gateway setup: Anthropic's official Claude Desktop on 3P docs on claude.com/docs (overview, feature comparison, installation and setup, in-app configuration, LLM gateway, models and effort levels, Chat, Code, legal and compliance pages, plus the configuration changelog), crawled 2026-10-07. How the desktop app relates to the CLI: the official Claude Code docs on code.claude.com (the desktop application page, the connect-to-an-LLM-gateway page and the other-LLM-gateways page), crawled the same day. QCode addresses, keys and endpoint rules: the QCode docs' Claude Desktop setup page (updated 2026-09-25), the endpoints and API formats page, the environment variables page and the subscriptions and QCode key page, crawled the same day.
Connect Claude Desktop to QCode
Set the inference provider to Gateway, use https://api.qcode.cc/api as the address and a QCode key starting with cr_, and pick a Claude model. Billed per token; see /models for each model's price.
Related reading
Claude Code Desktop redesign 2026
The 2026-04-14 redesign: Mission Control sidebar, parallel sessions and an integrated terminal.
Pointing Claude Code at a custom endpoint
For the CLI side: how to set ANTHROPIC_BASE_URL and AUTH_TOKEN.
Claude Code user guide
A complete CLI tutorial, from installation to mastery.
The steps and quotes on this page were checked on 2026-10-07 against Anthropic's official docs and the QCode docs; upstream changes may happen without notice. Menu and button names in the desktop app change between versions, so go by the version you have; model availability is whatever /models shows.