Skip to main content
← Back to ZotGPT Gateway

Connect Your Clients

Setup guides and raw config file examples for pointing the AI tools you already use — Claude Desktop (Chat, Cowork & Code), VS Code, and opencode — at ZotGPT Gateway. Codex support is coming soon.

Replace every __REPLACE__ with your own virtual API key from the Gateway portal before using any config below.

Reference Values

Every example on this page reuses the same handful of values. Gather these once, then swap them into whichever client you're setting up.

https://api.portkey.ai

Base URL for Anthropic-style clients (Claude Desktop).

https://api.portkey.ai/v1

Base URL for OpenAI-compatible clients (VS Code, opencode).

__REPLACE__

Your self-managed virtual API key, generated from your workspace in the Gateway portal.

@zotgpt-api-bedrock

Your provider alias, sent as the x-portkey-provider header on Anthropic-style clients.

ZotGPT Gateway · Setup Guide

Using Your Gateway Key with Claude Desktop

Connect the Claude desktop app to the Gateway and use Claude — plus the app's built-in Cowork and Code modes — through your UCI account instead of a personal subscription.

Faculty, staff, researchers & grad students About 10 minutes No config files or terminal

The Claude desktop app is more than a chat window — it also runs Cowork (file and task automation) and Code (agentic coding) in the same interface. Once setup is complete, all three route through the Gateway, billed to your Gateway budget and visible in the usage dashboard.

Your privacy is protected. Prompts are covered by the same protections as ZotGPT — none of your data is used to train models, and only token counts are visible for billing.

Before you begin

What you need first

A ZotGPT Gateway account

Faculty, staff, and grad students are auto-provisioned with Free Tier access ($50 starter credits) on first sign-in. Undergraduates need a sponsoring PI. Sign in at the Gateway portal with your UCInetID.

The Claude desktop app

Install the desktop app for macOS or Windows. Download it here before starting the steps below.

Step-by-step

Set up the connection

1

Generate a virtual API key

  1. Sign in to the Gateway portal with your UCInetID.
  2. Open your workspace and go to API Keys → Create new key.
  3. Copy the key somewhere safe. Treat it like a password — anyone who has it can spend your budget.

While you're in the portal, open the Model Catalog and note your provider slug. UCI routes Claude through AWS Bedrock — the slug is @zotgpt-api-bedrock. You'll use it in Step 3.

2

Enable Developer Mode & open the inference settings

The inference settings live in the app's Developer menu, which is hidden by default.

macOS

Menu bar → HelpTroubleshootingEnable Developer Mode

Windows

App menu (≡, top-left) → HelpTroubleshootingEnable Developer Mode

Once enabled, open the Developer menu and choose Configure third-party inference. On the Connection tab, set the connection source to Gateway.

3

Enter the Gateway connection

Under Gateway credentials, enter:

Gateway base URL
https://api.portkey.ai
Gateway API key
your virtual key from Step 1
Gateway auth scheme
bearer
Credential kind
Static API key

Then, under Custom inference headers, click Add and enter one header:

Header name
x-portkey-provider
Value
@zotgpt-api-bedrock/

Include the trailing slash on the provider value. This header tells the Gateway which provider to route to; without it, requests fail with Either x-portkey-config or x-portkey-provider header is required.

4

Set the model list

Scroll to the Models section. Leave Model discovery turned off — when on, the app tries to auto-load models from a route that isn't available for Bedrock-backed keys, which produces an error. A manual list avoids this.

Under Model list, click Add and enter the model IDs you want. The first entry becomes your default:

Sonnet 4.6 · default
us.anthropic.claude-sonnet-4-6
Opus 4.8
us.anthropic.claude-opus-4-8
Haiku 4.5
us.anthropic.claude-haiku-4-5-20251001-v1:0

If these IDs don't work, check your workspace's Model Catalog for the current list.

5

Test the connection

Click Test connection at the top of the Gateway credentials box. A successful test confirms your base URL, key, and provider header are correct.

Then start a new chat, choose a model from the picker, and send a message. Your request will appear within seconds in the usage dashboard, with its token count and cost.

Beyond chat

Using Cowork and Code

With the Gateway connection set, the app's Cowork and Code modes route through the Gateway just like chat — hand off multi-step tasks, work with local files, and run agentic coding sessions, all billed to your Gateway budget. No additional configuration is needed.

Because agentic sessions can use a large number of tokens, set a budget on your key before running long tasks.

If something goes wrong

Troubleshooting

SymptomCauseFix
Either x-portkey-config or x-portkey-provider header is requiredProvider header missing or misspelledAdd x-portkey-provider with value @zotgpt-api-bedrock/
Test connection fails, or fetch failed/v1 was added to the base URLUse https://api.portkey.ai exactly, with no /v1
Model picker is empty or errors on launchModel discovery is onTurn Model discovery off and add models manually (Step 4)
Authentication failsWrong auth schemeSet Gateway auth scheme to bearer
A specific Anthropic feature is unavailableRouted through Bedrock, which doesn't expose every native capabilityExpected — most everyday functionality works; a few native-only features may not

Verify against the saved config files

The Gateway connection you entered in Steps 3 & 4 gets written to a local settings file behind the scenes — a different file depending on whether you're using the Claude Code CLI or the Claude Desktop app. If the in-app fields ever look out of sync, open the matching file directly and compare it line-by-line against the examples below.

Claude Code (CLI)

~/.claude/settings.json

settings.json · for reference — the CLI manages this file for you

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.portkey.ai",
    "ANTHROPIC_API_KEY": "__REPLACE__",
    "ANTHROPIC_CUSTOM_HEADERS": "x-portkey-api-key: __REPLACE__\nx-portkey-provider: @zotgpt-api-bedrock",
    "ANTHROPIC_MODEL": "us.anthropic.claude-sonnet-4-6",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}

Claude Desktop (app)

~/.claude/settings_portkey.json

settings_portkey.json · for reference — the app manages this file for you

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.portkey.ai",
    "ANTHROPIC_AUTH_TOKEN": "__REPLACE__",
    "ANTHROPIC_CUSTOM_HEADERS": "x-portkey-api-key: __REPLACE__\nx-portkey-provider: @zotgpt-api-bedrock",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "@zotgpt-api-bedrock/us.anthropic.claude-opus-4-8",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "@zotgpt-api-bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0"
  },
  "model": "opus"
}

Direct edits to these files aren't officially supported — use them to spot a typo, then fix the mismatched field back in Steps 3 & 4 of the app (or in your Claude Code environment configuration).

Stay in control

Managing cost and visibility

Set a budget on your key

Cap spend per day, week, or month and add rate limits in the portal — especially before running long Cowork and Code sessions.

Track usage

Every request is logged with tokens and cost in the usage dashboard.

Need higher limits?

Faculty and staff with a KFS number can request Standard Tier through the ServiceNow intake form. Researchers with specialized workloads can apply for the Advanced Research Tier.

Questions or access issues? Contact the ZotGPT team through the Help Center.

VS Code

Via the built-in Chat model picker

VS Code's Chat view can register custom language models directly. Add ZotGPT Gateway as a custom endpoint provider and list the models you want available in the model picker.

Linux — ~/.config/Code/User/chatLanguageModels.json

macOS — ~/Library/Application Support/Code/User/chatLanguageModels.json

Windows — %APPDATA%\Code\User\chatLanguageModels.json

  1. 1Generate your virtual API key in the Gateway portal.
  2. 2Open or create chatLanguageModels.json at the path shown below.
  3. 3Paste the block below, replacing every __REPLACE__ with your key, then reload VS Code.

chatLanguageModels.json · chatLanguageModels.json

{
  "name": "Portkey",
  "vendor": "customendpoint",
  "apiKey": "${input:chat.lm.secret.732100ad}",
  "apiType": "messages",
  "models": [
    {
      "id": "@zotgpt-api-bedrock/us.anthropic.claude-opus-4-8",
      "name": "Portkey - Opus 4.8",
      "url": "https://api.portkey.ai/v1",
      "toolCalling": true,
      "vision": true,
      "thinking": true,
      "streaming": true,
      "maxInputTokens": 872000,
      "maxOutputTokens": 128000,
      "supportsReasoningEffort": [
        "high",
        "xhigh"
      ],
      "requestHeaders": {
        "x-portkey-api-key": "__REPLACE__"
      }
    },
    {
      "id": "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-5",
      "name": "Portkey - Sonnet 5",
      "url": "https://api.portkey.ai/v1",
      "toolCalling": true,
      "vision": true,
      "thinking": true,
      "streaming": true,
      "maxInputTokens": 872000,
      "maxOutputTokens": 128000,
      "supportsReasoningEffort": [
        "high"
      ],
      "requestHeaders": {
        "x-portkey-api-key": "__REPLACE__"
      }
    },
    {
      "id": "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-4-6",
      "name": "Portkey - Sonnet 4.6",
      "url": "https://api.portkey.ai/v1",
      "toolCalling": true,
      "vision": true,
      "thinking": true,
      "streaming": true,
      "maxInputTokens": 936000,
      "maxOutputTokens": 64000,
      "supportsReasoningEffort": [
        "high"
      ],
      "requestHeaders": {
        "x-portkey-api-key": "__REPLACE__"
      }
    },
    {
      "id": "@zotgpt-api-bedrock-mantle/google.gemma-4-26b-a4b",
      "name": "Portkey - Gemma 4 26B A4B MoE",
      "url": "https://api.portkey.ai/v1",
      "toolCalling": true,
      "vision": true,
      "thinking": true,
      "streaming": true,
      "maxInputTokens": 192000,
      "maxOutputTokens": 64000,
      "supportsReasoningEffort": [
        "high"
      ],
      "reasoningEffortFormat": "chat-completions",
      "apiType": "chat-completions",
      "requestHeaders": {
        "x-portkey-api-key": "__REPLACE__"
      }
    }
  ],
  "settings": {
    "@zotgpt-api-bedrock/us.anthropic.claude-opus-4-8": {
      "reasoningEffort": "xhigh"
    },
    "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-5": {
      "reasoningEffort": "high"
    },
    "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-4-6": {
      "reasoningEffort": "high"
    }
  }
}

VS Code language model provider docs

opencode

Open-source terminal coding agent

opencode supports custom providers directly in opencode.json. The Gateway team publishes two Portkey-backed providers (Anthropic-style and OpenAI-compatible models) plus an optional local provider for on-device testing.

Global config — ~/.config/opencode/opencode.json

Project config — ./opencode.json

  1. 1Generate your virtual API key in the Gateway portal.
  2. 2Open or create opencode.json (global or project) and paste the block below.
  3. 3Replace every __REPLACE__ with your key, pick a model with provider/model syntax, and restart opencode.

opencode.json · opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "portkey-anthropic": {
      "npm": "@ai-sdk/anthropic",
      "name": "Portkey Anthropic",
      "options": {
        "baseURL": "https://api.portkey.ai/v1",
        "apiKey": "bypass-validation",
        "headers": {
          "x-portkey-api-key": "__REPLACE__"
        }
      },
      "models": {
        "@zotgpt-api-bedrock/us.anthropic.claude-opus-4-8": {
          "name": "Portkey - Opus 4.8",
          "family": "claude-opus",
          "attachment": true,
          "reasoning": true,
          "tool_call": true,
          "temperature": false,
          "release_date": "2026-05-28",
          "last_updated": "2026-05-28",
          "modalities": {
            "input": [
              "text",
              "image",
              "pdf"
            ],
            "output": [
              "text"
            ]
          },
          "open_weights": false,
          "limit": {
            "context": 1000000,
            "output": 128000
          },
          "cost": {
            "input": 5,
            "output": 25,
            "cache_read": 0.5,
            "cache_write": 6.25
          },
          "options": {
            "thinking": {
              "type": "adaptive",
              "display": "summarized"
            },
            "effort": "xhigh"
          }
        },
        "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-5": {
          "name": "Portkey - Sonnet 5",
          "family": "claude-sonnet",
          "attachment": true,
          "reasoning": true,
          "tool_call": true,
          "structured_output": true,
          "temperature": false,
          "knowledge": "2026-01-31",
          "release_date": "2026-06-30",
          "last_updated": "2026-06-30",
          "modalities": {
            "input": [
              "text",
              "image",
              "pdf"
            ],
            "output": [
              "text"
            ]
          },
          "open_weights": false,
          "limit": {
            "context": 1000000,
            "output": 128000
          },
          "cost": {
            "input": 2,
            "output": 10,
            "cache_read": 0.2,
            "cache_write": 2.5
          },
          "options": {
            "thinking": {
              "type": "adaptive",
              "display": "summarized"
            },
            "effort": "high"
          }
        },
        "@zotgpt-api-bedrock/us.anthropic.claude-sonnet-4-6": {
          "name": "Portkey - Sonnet 4.6",
          "family": "claude-sonnet",
          "attachment": true,
          "reasoning": true,
          "tool_call": true,
          "structured_output": true,
          "temperature": true,
          "knowledge": "2025-08-31",
          "release_date": "2026-02-17",
          "last_updated": "2026-03-13",
          "modalities": {
            "input": [
              "text",
              "image",
              "pdf"
            ],
            "output": [
              "text"
            ]
          },
          "open_weights": false,
          "limit": {
            "context": 1000000,
            "output": 64000
          },
          "cost": {
            "input": 3,
            "output": 15,
            "cache_read": 0.3,
            "cache_write": 3.75
          },
          "options": {
            "thinking": {
              "type": "adaptive"
            },
            "effort": "high"
          }
        }
      }
    },
    "portkey-openai": {
      "npm": "@ai-sdk/openai",
      "name": "Portkey OpenAI Compatible",
      "options": {
        "baseURL": "https://api.portkey.ai/v1",
        "apiKey": "bypass-validation",
        "headers": {
          "x-portkey-api-key": "__REPLACE__"
        }
      },
      "models": {
        "@zotgpt-api-bedrock-mantle/google.gemma-4-26b-a4b": {
          "name": "Portkey - Gemma 4 26B A4B MoE",
          "family": "gemma",
          "attachment": true,
          "reasoning": true,
          "tool_call": true,
          "structured_output": true,
          "temperature": true,
          "release_date": "2026-04-02",
          "last_updated": "2026-04-02",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "open_weights": true,
          "limit": {
            "context": 192000,
            "output": 64000
          },
          "cost": {
            "input": 0.13,
            "output": 0.4
          },
          "options": {
            "responses_api": true,
            "forceReasoning": true,
            "systemMessageMode": "system",
            "parallelToolCalls": false,
            "reasoningEffort": "high"
          },
          "variants": {
            "none": {
              "disabled": true
            },
            "xhigh": {
              "disabled": true
            }
          }
        }
      }
    },
    "local": {
      "name": "Local",
      "options": {
        "baseURL": "http://0.0.0.0:5000/v1"
      },
      "models": {
        "gemma-4-26B-A4B-it-qat-UD-Q4_K_XL": {
          "name": "Local - Gemma 4 26B A4B MoE",
          "family": "gemma",
          "attachment": true,
          "reasoning": true,
          "tool_call": true,
          "structured_output": true,
          "temperature": true,
          "release_date": "2026-04-02",
          "last_updated": "2026-04-02",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "open_weights": true,
          "interleaved": true,
          "limit": {
            "context": 192000,
            "output": 64000
          },
          "reasoning_options": [
            {
              "type": "toggle"
            },
            {
              "type": "effort",
              "values": [
                "low",
                "medium",
                "high"
              ]
            }
          ]
        }
      }
    }
  }
}

opencode config docs

The Pattern Is Always the Same

Regardless of which client you connect, you're doing the same three things.

Point the client's base URL at ZotGPT Gateway instead of the vendor's default API.

Swap the vendor API key for your self-managed virtual API key from the Gateway portal.

Select a model slug from the Model Catalog and restart the client to pick up the change.

Need a Virtual API Key First?

Sign in to the Gateway portal with your UCInetID and generate a key before configuring any client above.

Codex support is coming soon · check back for updates · Supported by UCI OIT