Connect Claude#
Connect Claude Code or Claude Desktop to OptScale AI so Claude workflows use models available through your OptScale AI organization.
The integration is supported on Windows, Linux, and macOS.
Before configuring Claude, open Connect this model to external tools → OPENAI-COMPATIBLE in Chat and retrieve the required connection values. For Claude integrations, replace the /v1 suffix in the copied Base URL with /anthropic.
For details, see Get connection values from Chat.
For shared requirements and limitations, see External Tools.
Prerequisites#
Before configuring Claude, confirm that:
- An organization exists and at least one Active provider is configured.
- The user has access to the required providers.
- The OptScale AI deployment is accessible over HTTPS with a valid TLS certificate.
- For workflows that use tools, the selected model supports tool execution.
Connect Claude Code#
1. Open or create the Claude Code user settings file:
- For Windows:
%USERPROFILE%\.claude\settings.json - For macOS and Linux:
~/.claude/settings.json

2. In Chat, open Connect this model to external tools → CLAUDE.
In the Claude Code section, copy the contents of the generated env block.

Add the copied values to the env section of your Claude Code settings.json file.
The selected OptScale AI provider and model are added to all three Claude Code model tiers:
ANTHROPIC_DEFAULT_HAIKU_MODELANTHROPIC_DEFAULT_SONNET_MODELANTHROPIC_DEFAULT_OPUS_MODEL
We recommend keeping only the model variable for the Claude Code tier you want to use and removing the other model variables.
For example, to use the selected OptScale AI model as Haiku, keep ANTHROPIC_DEFAULT_HAIKU_MODELand remove ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_OPUS_MODEL.
At least one model variable must remain configured.
3. To update an existing env configuration, use the values from the Claude Desktop section of the same dialog:

- Gateway base URL →
ANTHROPIC_BASE_URL - API key →
ANTHROPIC_AUTH_TOKEN - Model name →
ANTHROPIC_DEFAULT_HAIKU_MODEL,ANTHROPIC_DEFAULT_SONNET_MODEL, orANTHROPIC_DEFAULT_OPUS_MODEL, depending on the Claude Code tier you want to configure.
If multiple model variables are configured, Claude Code uses the corresponding model for each tier.
4. Save the file.
5. Run claude /logout, restart Claude Code, and then run /models. Confirm that the configured models appear in the list.
6. Send the test prompt described in Verify the connection.
Connect Claude Desktop#
1. Open Claude Desktop and enable Developer Mode: Help → Troubleshooting → Enable Developer Mode.
2. Open the third-party inference settings: Developer → Configure Third-Party Inference.

3. In Connection, select Gateway from the provider dropdown.

4. Enter the gateway connection values:

-
Gateway base URL — Copy the Gateway base URL from Connect this model to external tools → CLAUDE (Claude Desktop section) and paste it into this field.

-
Gateway API key — Copy API key from the same Chat dialog and paste it into Gateway API key.

5. Configure models in Connection → Models:
-
Model discovery — Enable to populate the model picker automatically from the gateway.

-
Model list — Add models manually by specifying Model ID and Display name.

-
Model ID — Copy Model name from OptScale AI Chat.

-
Display name — Enter a descriptive label for the model.
-
6. Click Apply Changes. When prompted, click Save & Restart to relaunch Claude Desktop with the new configuration.

7. Confirm that the gateway connection is active and the configured models appear in the model selector.
Verify the connection#
In Claude Code or Claude Desktop, send the following prompt:
Reply with exactly: OptScale AI connection works.
The expected response is:
OptScale AI connection works.
In the Admin Console, open Analytics → Traces and confirm that a row appears for the selected Provider and Model. Requester is the user for whom the connection was configured.
See also#
- Get connection values from Chat — Retrieve the Base URL, API key, and model name.
- External Tools — Review shared requirements and limitations.
- Connect Cursor — Connect Cursor to OptScale AI.
- Analytics → Traces — Verify requests after connecting.