Claude Desktop
Last updated
Claude Desktop can send its requests to an LLM gateway instead of Anthropic. Point it at Tempr Gateway and it runs on your own provider keys, under your virtual key's allowlist, budgets and guardrails, with every request in your logs. It can also run models other than Claude, because Tempr answers Anthropic's Messages API for any model you have a key for.
-
Create a virtual key for Claude Desktop
In the Portal, create a Gateway virtual key just for Claude Desktop. Keys start with
tvk_and are shown once. Give it the models people may use, a budget, and any budget rules you want; a key in a device profile can be read on each machine it's installed on. -
Add a provider key
Gateway is BYOK: add a key for each provider whose models you'll offer, usually Anthropic. See the supported providers.
-
Point Claude Desktop at Tempr
Set the inference provider to Gateway, the gateway URL to
https://api.temprhq.io, and the API key to your virtual key, either in the app or in a device profile, both below.
Set it up in the app
To try it on one machine, turn on developer mode (Help → Troubleshooting → Enable Developer Mode), then open Developer → Configure Third-Party Inference:
| Setting | Value |
|---|---|
| Inference provider | Gateway |
| Gateway base URL | https://api.temprhq.io, without /v1: Claude Desktop adds /v1/messages itself. |
| API key | Your tvk_ virtual key |
| Auth scheme | Bearer (the default). Tempr also takes the key in x-api-key. |
| Model discovery | On. Claude Desktop then lists the models your key can use, from GET /v1/models. |
The same window can Export what you set as a .mobileconfig, a .reg file or an ADMX template, which is the easiest way to get the profiles below right for your version of Claude Desktop.
Roll it out with device management
A managed profile wins over anything set in the app, and turns the in-app window read-only. Every value is a string, booleans included.
macOS: a configuration profile
Deploy this .mobileconfig through your MDM (Jamf, Kandji, Intune and others). Its settings land in the com.anthropic.claudefordesktop preference domain. Give each PayloadUUID a fresh value from uuidgen.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key><string>com.anthropic.claudefordesktop</string>
<key>PayloadIdentifier</key><string>com.example.claude-desktop.tempr</string>
<key>PayloadUUID</key><string>REPLACE-WITH-UUIDGEN</string>
<key>PayloadVersion</key><integer>1</integer>
<key>PayloadDisplayName</key><string>Claude Desktop through Tempr Gateway</string>
<key>inferenceProvider</key><string>gateway</string>
<key>inferenceGatewayBaseUrl</key><string>https://api.temprhq.io</string>
<key>inferenceGatewayApiKey</key><string>tvk_...</string>
<key>inferenceGatewayAuthScheme</key><string>bearer</string>
<key>modelDiscoveryEnabled</key><string>true</string>
</dict>
</array>
<key>PayloadType</key><string>Configuration</string>
<key>PayloadIdentifier</key><string>com.example.claude-desktop</string>
<key>PayloadUUID</key><string>REPLACE-WITH-UUIDGEN</string>
<key>PayloadVersion</key><integer>1</integer>
<key>PayloadDisplayName</key><string>Tempr Gateway for Claude Desktop</string>
<key>PayloadScope</key><string>System</string>
</dict>
</plist>
Windows: registry policy
Import this .reg file, or set the same values with Group Policy or Intune. The values go straight under HKLM\SOFTWARE\Policies\Claude as REG_SZ strings, not in a subkey. Once any value is set there, Claude Desktop ignores the per-user HKCU policy entirely.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Claude]
"inferenceProvider"="gateway"
"inferenceGatewayBaseUrl"="https://api.temprhq.io"
"inferenceGatewayApiKey"="tvk_..."
"inferenceGatewayAuthScheme"="bearer"
"modelDiscoveryEnabled"="true"
Linux
Write the same settings to /etc/claude-desktop/managed-settings.json:
{
"inferenceProvider": "gateway",
"inferenceGatewayBaseUrl": "https://api.temprhq.io",
"inferenceGatewayApiKey": "tvk_...",
"inferenceGatewayAuthScheme": "bearer",
"modelDiscoveryEnabled": "true"
}
Models
With model discovery on, Claude Desktop's model picker shows what your key can use, by Tempr's provider/model ids. To choose the list yourself, leave discovery off and set inferenceModels to those ids, for example anthropic/claude-sonnet-4-5 (it needs an Anthropic key in the Portal) and openai/gpt-5 (an OpenAI key), or any from GET /v1/models. On an anthropic/… model, Tempr passes requests to Anthropic unchanged, so extended thinking and Claude's server tools work as they do directly; other models are translated, as for Claude Code. To keep everyone on one model whatever they pick, give the key a default model and tick Always use it.
One key for everyone, or a key each
A profile carries one key, so everyone it's installed for shares that key's budget, limits and request logs. To keep teams apart, give each team its own key and profile. To give each person their own key, use Claude Desktop's credential helper instead of a fixed key: set inferenceCredentialKind to helper-script and inferenceCredentialHelper to a program that prints that person's tvk_ key, from your secrets manager for example.
Don't put keys in inferenceCustomHeaders: Claude Desktop sends those headers with every request and treats them as routing information, not as a secret.
On a coding plan
Tempr serves each coding plan only to the tools its vendor allows, and recognises a tool by the identity it sends. Claude Desktop isn't one of the coding tools plans name, and Tempr doesn't recognise it, so Tempr can't tell it from a script, and a plan limited to the tools its vendor names, or to coding tools Tempr recognises (Z.AI, Kimi, Alibaba, Tencent, KUAE and others), refuses it with a plan_tool_not_allowed error. Claude Desktop can use the plans that accept any tool: MiniMax, StepFun, Synthetic, Ollama Cloud, NanoGPT, Fire Pass and ClinePass. Name the model by the plan: minimax-plan/MiniMax-M3.1-Flash-Preview. Tempr can get the plan's key two ways:
- Stored in Tempr. Add the plan's key under Provider keys in the Portal, and keep Claude Desktop's settings as they are, with your virtual key.
- Sent with each request. Point
inferenceCredentialHelperat a script that prints the plan's key as the token and your virtual key as a header, so neither sits in the configuration itself: Tempr sends the plan's key only to that plan, and never stores it. An organization's keys take a key sent this way once an owner or admin turns on Plan logins.
{"token": "<the plan's key>", "headers": {"x-tempr-key": "tvk_..."}}
Claude Desktop speaks Anthropic's Messages API, so choose a plan whose entry on Coding plans lists Messages. It doesn't know a coding plan's models: it gives each one a 200K context window and no effort setting.
Several plans are sold only for the coding tools they support, and some refuse other tools, telling them apart by the identity each tool sends. Tempr passes Claude Desktop's own along and never sends another, so check which tools each plan supports before you subscribe.
Ask Claude Desktop about your Gateway
Claude Desktop can also read your Gateway through the Gateway's own MCP server: usage and cost, request logs and one request's routing, keys, plan, and providers cooling down. Ask it "why did my last few requests fail?" or "which key spent the most this week?". It comes with the Gateway Pro, Scale and Enterprise plans.
Set up with Tempr as above, Claude Desktop doesn't let people add remote MCP servers in its own settings: the server comes from the same place as the inference settings. In Developer → Configure Third-Party Inference, add a connector with the transport HTTP, the URL https://api.temprhq.io/mcp/admin, and no headers. In a device profile, it's managedMcpServers; on Linux:
"managedMcpServers": [
{
"name": "tempr-gateway",
"transport": "http",
"url": "https://api.temprhq.io/mcp/admin",
"oauth": true
}
]
On macOS and Windows, the same list goes in as one JSON string. Claude Desktop then shows the server under Customize → Connectors with a Connect button, which opens Tempr's sign-in in the browser.
- It's for the people who look after the Gateway. Each person signs in with their own Tempr account. Owners and admins of your organization read its Gateway, including the key in your profile; anyone else reads only their own.
- It reads, unless you let it change. Tick Also let it make changes on Tempr's consent page when you connect it, and while the account allows changes by AI agents, it can make changes that only tighten, such as revoking a key, and propose any that would loosen, such as a higher budget, for you to approve in the Portal.
- Signed in to a Claude account instead of Tempr, Claude Desktop shares claude.ai's connectors: add it under Customize → Connectors → Add custom connector, with the same URL, and sign in to Tempr.
What's next
- The Gateway's MCP server: every tool, what it returns, and how text from your apps is marked.
- Authentication & virtual keys: allowlists, budgets, expiry and IP allowlists for the key in your profile.
- Request logs and log streaming: see what Claude Desktop sends, in the Portal or in your own tools.
- Claude Code: the same gateway from the terminal.