Claude Desktop can connect to a third-party inference gateway through Developer Mode. A Claude-group key works directly with an Anthropic-compatible endpoint, while an OpenAI-compatible group needs a local route through CC Switch. This guide documents the current macOS workflow, from choosing the API key group to verifying the request in Dashboard.
Connect your API key through the matching route and verify it immediately. BetterToken provides separate OpenAI-compatible and Anthropic-compatible interfaces, so you cannot choose the address from the model name alone. Open the current BetterToken guide for Claude Desktop, identify your API key group, and follow the corresponding section below.
What third-party inference means in Claude Desktop
In the regular setup, Claude Desktop uses an Anthropic account and Anthropic services. Third-party inference changes the route for model requests: the app sends them to the configured gateway. It does not turn a third-party API into a Claude subscription or remove the application's own requirements for installation, updates, or feature availability.
Do not confuse an inference gateway with Desktop Extensions or MCP. Extensions give Claude access to local applications and data. A gateway handles the route to the model. A failure in one layer does not prove that the other one is broken.
Anthropic's current documentation says Claude Desktop is available for macOS, Windows, and Linux beta. The Help → Troubleshooting and Developer → Configure Third-Party Inference… menu paths below are confirmed by BetterToken's current macOS guide. On another operating system, first check whether the installed app exposes the same settings.
Choose a route based on the API key group
- Claude group: direct Anthropic-compatible gateway; Gateway base URL:
https://www.bettertoken.ai; auth scheme:x-api-key. - Codex group: BetterToken → CC Switch → local Claude route; Gateway base URL: the Service address from CC Switch; auth scheme:
bearer.
For a Codex-group key, do not enter https://www.bettertoken.ai/v1 directly in the Claude Desktop Gateway field. That is an OpenAI-compatible Base URL, while the Gateway field expects an Anthropic-compatible route. CC Switch accepts the OpenAI Responses API, maps the models, and provides Claude Desktop with a local service address.
Direct setup for a Claude-group key
1. Install the current Claude Desktop app
Download the app from the official Claude page. For a regular installation, Anthropic asks you to sign in. In the current BetterToken Gateway workflow, configuration starts before the regular sign-in flow; follow the gateway guide's exact sequence so that the two modes are not mixed.
2. Enable Developer Mode
Open this path in the macOS menu:
Help → Troubleshooting → Enable Developer Mode
Select Enable and fully relaunch Claude Desktop. A Developer menu should appear after the restart.
3. Open the gateway settings
Go to:
Developer → Configure Third-Party Inference…
Select Gateway and fill in the fields:
Gateway base URL: https://www.bettertoken.ai
Gateway API key: your API key from Token management
Gateway auth scheme: x-api-key
Do not put the key in an article, screenshot, public log, or repository. After you select x-api-key, the app should request the models available to the Claude group.
4. Apply the settings and relaunch the app
Select Apply locally, then Relaunch now. After the app starts, select Continue with Gateway. The Cowork 3P | Gateway label in the lower-left corner indicates that the route is active.
Local route for a Codex-group key
This route has an extra layer: Claude Desktop connects to a local CC Switch address, and CC Switch sends requests to the BetterToken OpenAI Responses API.
1. Add BetterToken as a provider in CC Switch
Open Claude Code, select Add Provider, and fill in:
Provider Name: BetterToken
Base URL: https://www.bettertoken.ai
API Key: your BetterToken API key
Under Advanced Options, select OpenAI Responses API. Then select Fetch Model List and explicitly assign models to the available mapping fields. Use only current IDs from your Codex group; do not copy a model from an old article or someone else's screenshot.
2. Enable the local route
Save the provider, set it to In use, and enable the proxy. Under Settings → Routing, check the main switch and the Claude route. Copy the displayed Service address: this is the local address that Claude Desktop needs.
3. Configure Gateway in Claude Desktop
Return to Developer → Configure Third-Party Inference…, select Gateway, and enter:
Gateway base URL: Service address from CC Switch
Gateway API key: your BetterToken API key
Gateway auth scheme: bearer
Under Model list, add the current Model ID and Display name values that you configured in CC Switch. Then select Apply locally, confirm Relaunch now, and select Continue with Gateway.
Verify the request and Dashboard record
Do not start by granting access to work directories or sending a long task. Send a short prompt without personal data—for example, ask for an explanation of the difference between a JSON array and an object. Then open BetterToken Dashboard.
A successful check has two signals:
- Claude Desktop displays the answer and the active
Cowork 3P | Gatewaymode. - Dashboard shows a matching record with the time, model, status, input/output/cache tokens, and charge.
If the app returns an answer but no record appears, first make sure it is actually using Gateway rather than another mode. If the record has an error status, the request reached the API layer: check the key group, auth scheme, model, and balance. Do not use Dashboard as storage for a full prompt or answer; remove keys and request content from logs before contacting support.
Troubleshoot a failed Claude Desktop connection
- The
Developermenu does not appear: enable Developer Mode again and fully quit Claude Desktop instead of only closing its window. Your provider setup needs a fix: check the Model list, current IDs, and every required mapping field in CC Switch.- A 401 or 403 error: use
x-api-keyfor a Claude-group key; usebearerfor the local Codex-group route. - No answer and no Dashboard record: check that the proxy, main Routing switch, and Claude route are enabled in CC Switch.
- A record appears but the request fails: check the key group, current model, available balance, and accidental whitespace in the key.
- Nothing changes after
Apply locally: selectRelaunch now, thenContinue with Gateway.
Do not diagnose Gateway from one interface label. Compare the Claude Desktop mode, the local route state, and the Dashboard request record. Together, they show which layer interrupted the request.
Limitations of this setup
BetterToken is an independent API provider, not an Anthropic product or a replacement for a Claude subscription. It is responsible for its own API Endpoint and connection documentation. Download availability, sign-in, updates, Cowork, Code mode, and other Claude Desktop features depend on the current app version, plan, and Anthropic policies.
Connecting from Russia to the BetterToken API Endpoint does not require a VPN, but this statement does not cover the Claude website, app download, account, or external services. If the menu paths differ from this article, stop and compare the official Claude Desktop installation documentation with the current BetterToken setup guide.
FAQ
Can I enter https://www.bettertoken.ai/v1 in Claude Desktop Gateway?
Not for the workflow described here. It is an OpenAI-compatible address. A Claude-group key uses the direct Anthropic-compatible endpoint at https://www.bettertoken.ai, while a Codex-group key connects through the local CC Switch Service address.
Do I need a Claude account for Gateway mode?
Anthropic's regular instructions ask you to sign in after installation. The current BetterToken Gateway guide takes you through Continue with Gateway before the regular sign-in flow. Do not transfer steps from one mode to another; check the interface in your installed version of Claude Desktop.
How do I know which auth scheme is correct?
Use x-api-key for the direct Claude-group route. Use bearer for a Codex-group key through the local CC Switch route. After applying the settings, confirm both an answer in Desktop and a new record in Dashboard.