T3 Code Custom API: Connect Claude and GPT via QCode
Add QCode to T3 Code on Windows 11 & macOS in 10 screenshots: install the CLI, add a Claude provider instance, fill in the Environment variables and get a real reply.
Need an API key? Sign up →Endpoints & base URLs →
On This Page
Short answer: In T3 Code, open Settings > Providers, add a Claude instance named QCode, then fill its Environment → Variables with the QCode base URL and your key.
| Item | Fill in |
|---|---|
Base URL (ANTHROPIC_BASE_URL) |
https://api.qcode.cc/api |
Key (ANTHROPIC_AUTH_TOKEN) |
cr_xxxxxxxx |
Empty variable (ANTHROPIC_API_KEY) |
(empty) |
Claude config folder (CLAUDE_CONFIG_DIR path) |
~/.claude_qcode |
| Recommended Claude model | claude-opus-5-5 |
Checked on 2026-11-22 · T3 Code 0.1.11 · Windows 11
Follow the 10 screenshots below on a Windows PC or a Mac and you end up with a QCode-powered Claude model answering inside T3 Code. T3 Code does not call a model API on its own: it drives the agents already on your machine, so Claude Code is installed first and then pointed at QCode through a provider instance of its own.
On a Mac? Follow the same steps. The screenshots were taken on Windows 11, and T3 Code on macOS has the same screens and settings. Download the macOS version from the same official page, press ⌘ Cmd wherever a step says Ctrl, and find the app's menus in the menu bar at the top of the screen.
Before the first screenshot, check that you have these:
- A Windows 10 or 11 PC or a Mac, 64-bit, that can open websites and run PowerShell
- Claude Code already installed, because T3 Code only drives the agents it can find on the machine (step 1 shows how to check)
- A QCode API key copied from your dashboard (
cr_xxxxxxxx); this is the one item you cannot skip. No account yet? Sign up first, pick a plan on the pricing page, then create the key in your Dashboard. - About 600 MB of unused disk space: the T3 Code CLI runtime plus Claude Code
- A terminal window you can keep open while you work, since T3 Code keeps running in it
Download and install T3 Code¶
T3 Code for Windows comes either as a command-line runtime installed by a one-line PowerShell script, or as a desktop installer. The screenshots use the command-line route, which needs no administrator rights and shows no security prompt. Pick the tab that matches where you are:
Other regions
Open t3.codes and use the command for Windows. In PowerShell:
irm https://t3.codes/install.ps1 | iex
Or install through winget, which takes the same release build:
winget install T3Tools.T3Code
The desktop installer is also on the release page github.com/pingdotgg/t3code/releases/tag/v0.1.11: T3-Code-0.1.11-x64.exe for ordinary Intel and AMD PCs, T3-Code-0.1.11-arm64.exe for Windows on ARM.
Mainland China
The installer script itself is tiny, but the 162 MB runtime is downloaded from GitHub, which can be slow or unreachable for a while from mainland China. If the script stalls at Downloading, stop it with Ctrl+C, wait a few minutes, and run the same command again.
For Claude Code, the npm route is usually the easier one there, because the npm registry has a mirror:
npm config set registry https://registry.npmmirror.com
npm install -g @anthropic-ai/claude-code
Claude Code's own installer downloads its binary from Anthropic's servers, so it can fail even when npm works. If nothing gets through, try again on another network, or use the desktop installer T3-Code-0.1.11-x64.exe from the release page github.com/pingdotgg/t3code/releases/tag/v0.1.11 when the page finally loads.
Claude Code has three ways in; any one of them is enough for this guide:
npm install -g @anthropic-ai/claude-code # needs Node.js first
irm https://claude.ai/install.ps1 | iex # native installer, no admin rights
winget install Anthropic.ClaudeCode # winget route
The npm route needs Node.js: install it from nodejs.org/en/download, or run winget install OpenJS.NodeJS, then close and reopen PowerShell so the new node and npm are found.
Check that Claude Code is installed¶
Press Win, type PowerShell, and open Windows PowerShell. Run claude --version and watch the answer: ① the version line that comes back, for example 2.1.330 (Claude Code), is the agent T3 Code will be driving.

Stuck? PowerShell says claude is not recognized
Claude Code is not installed, or this window was opened before the install and still has the old PATH. Install it with one of the commands above, close PowerShell, open a new window, and run claude --version again.
Done right you will see: one line under the command with a version number and (Claude Code) after it, and no red error text.
Install T3 Code¶
Stay in the same PowerShell window and run:
irm https://t3.codes/install.ps1 | iex
① the line Installed T3 Code 0.1.11 marks the end of the download and unpacking. ② right under it, Run t3 to get started is the command you need next; the rest of that line tells you how to keep t3 reachable in future windows.

Stuck? The download stops halfway
The runtime is about 162 MB and comes from GitHub; the speed depends on your network. Press Ctrl+C, wait a minute, and run the same command again. winget install T3Tools.T3Code installs the same version if the script keeps failing.
Done right you will see: Installed T3 Code 0.1.11, then the Run t3 to get started line, with the PowerShell prompt back underneath.
Start T3 Code¶
Run one command in that same window:
t3
① the address bar of the browser window that opens by itself reads localhost:3773 — that is the T3 Code web app running on your own PC. ② the gear icon in the bottom-left corner is where every setting in the rest of this guide lives.

Stuck? No browser window opens
Leave the PowerShell window alone — closing it stops T3 Code. Open a browser yourself and go to http://localhost:3773. If the page asks you to pair, start t3 again and use the pair#token=... link it prints, or paste the token it shows.
Done right you will see: a browser tab with the T3 Code app, the URL localhost:3773, and a gear icon at the bottom left. The PowerShell window keeps running in the background and prints a Listening on line.
Open Settings, then Providers¶
Click the gear icon, then Providers in the settings sidebar. ① Providers is the page that lists every agent T3 Code can drive. ② the row already there — Claude v2.1.330 — is the Claude Code you checked in step 1, found automatically. ③ + Add provider at the bottom of the list starts a new instance, which is what gives QCode its own endpoint and key.

Done right you will see: a Providers page with one detected Claude row showing its version, and a + Add provider button you can click.
Choose Claude in the Add provider wizard¶
+ Add provider opens a short wizard. Step 1 is Provider: ① pick the Claude tile in the grid, which turns the primary button into Next. ② click Next to move on.

Stuck? There is no Claude tile
A very old build only knows Codex. Update T3 Code to 0.1.11 with the installer command from the download section, stop t3 with Ctrl+C, start it again and reopen Settings > Providers.
Done right you will see: the Claude tile highlighted, and the button at the bottom right reading Next instead of being greyed out.
Name the instance and set its config folder¶
Step 2 of the wizard is Identity: type QCode in Label so the instance is easy to tell apart from the built-in Claude row, then click Next. Step 3 is Config, shown here: ① leave Binary path as claude. ② put ~/.claude_qcode in CLAUDE_CONFIG_DIR path — T3 Code expands ~ to your user folder, so this stays a separate config folder that the QCode key can live in. ③ click Add instance to finish.

Stuck? “Authentication errors” even though the key is right
That happens when the config folder you reused still holds a cached Anthropic login, which wins over the QCode key. Run /logout in a Claude Code session that uses the same folder, or simply give the instance a fresh folder such as ~/.claude_qcode as above.
Done right you will see: the wizard closes and a second row named QCode appears in the provider list, next to the built-in Claude row. Its status is not authenticated yet — the next step fixes that.
Fill in the three environment variables¶
Open the QCode instance and scroll to Environment → Variables. Click + Add variable three times and fill the rows like this:
| Name | Value | Padlock |
|---|---|---|
ANTHROPIC_BASE_URL |
https://api.qcode.cc/api |
unlocked |
ANTHROPIC_AUTH_TOKEN |
your cr_ key |
locked |
ANTHROPIC_API_KEY |
leave empty | unlocked |
① the first row's value field shows the QCode address as plain text, because you unlocked its padlock before typing. ② the closed padlock on the ANTHROPIC_AUTH_TOKEN row keeps your key stored as a secret, so the field only ever shows Stored secret, enter a new value to replace. ③ once the three rows are in, the instance card on the left switches to Authenticated · Custom API endpoint. There is no Save button: click an empty spot and T3 Code saves.

Need an API Key?
If you do not have a QCode account yet, Sign up first. If a monthly plan does not suit you, buy a pack on the pay-as-you-go page, then create the key in your Dashboard. Copy the string that starts with cr_. You can pay by credit or debit card (Visa / Mastercard) — see Payment methods.
Stuck? The base URL turned into “Stored secret”
Every new variable row arrives with its padlock closed, which marks the value as sensitive. Click the padlock to open it before typing anything in the base URL or the empty ANTHROPIC_API_KEY row; a row that already shows Stored secret, enter a new value to replace needs the value typed again after you unlock it. Leave the padlock closed on the key row only.
Done right you will see: the base URL readable in full, a closed padlock on the key row, three variable rows with no red text, and the instance card reading Authenticated · Custom API endpoint.
Look at the model list¶
Scroll further down to Models. ① the built-in Claude models are already listed and switched on, including Claude Opus 5.5 (claude-opus-5-5), the model this guide recommends for everyday work. ② + Add custom model is only needed for a model ID outside that list — here a Chinese QCode model, glm-5.3, was added that way. Add one, type the full ID, and click Add.

Stuck? “That model is already built in.”
The ID you typed is one of the models T3 Code ships with, so it cannot be added twice. Close the inline field with Cancel and pick the model in the chat picker instead; keep + Add custom model for IDs such as glm-5.3, deepseek-v4-pro or kimi-k3.1-pro.
Done right you will see: a long list of Claude models with green switches, and any custom ID you added sitting at the end of it with its switch on.
Pick the model in a new thread¶
Close the settings window with Esc and click New thread. ① open the model picker at the bottom right of the message box and type into its search field — it matches display names, so search Opus 5.5, not the hyphenated ID. ② click the model row that carries your QCode instance name. ③ the pill under the message box then shows the model you picked.

Stuck? “No models found”
The search matches the names shown in the list, not the lowercase IDs. Search Opus 5.5 or Sonnet 5.5 rather than a hyphenated slug. If the list is short, the QCode instance is not authenticated yet — go back to the variables step.
Done right you will see: a tick next to the model row, the QCode badge on the left rail of the picker, and the pill under the message box showing the chosen model name.
Send your first message¶
Click the message box, type ping, and press Enter. ① the icons at the top right of the thread control the details panel you closed earlier — you can ignore them here. ② the reply arrives a few seconds later as a bubble in the thread. ③ the pill under the message box still names the model that answered.

Stuck? The reply never arrives
Open Settings > Providers and look at the QCode card. If it does not say Authenticated · Custom API endpoint, the key or the base URL is not saved: retype both rows, then send ping again in a new thread. A base URL ending in / or in /v1/messages also makes every request fail.
Done right you will see: your ping as a message from you, an answer bubble under it within a few seconds, and no red error line in the thread.
Verify it works¶
Your setup is complete when all three of these are true:
- A new thread answers
pingwith a normal reply, and the model pill names the model you selected. - The
QCodecard in Settings > Providers readsAuthenticated · Custom API endpoint. - The same key answers on QCode directly. Run this in PowerShell, replacing the key:
curl -X POST https://api.qcode.cc/api/v1/messages -H "x-api-key: cr_xxxxxxxx" -H "anthropic-version: 2023-06-01" -H "content-type: application/json" -d '{"model":"claude-opus-5-5","max_tokens":32,"messages":[{"role":"user","content":"ping"}]}'
A JSON reply with a content array means the key and the address are both right, so any failure left is inside T3 Code. In the older Windows PowerShell 5.1, curl is an alias for Invoke-WebRequest; write curl.exe there instead. You can also open probe.qcode.cc, paste the same key and watch the request appear with the model you chose; that page is in Chinese only.
All done¶
You now have a QCode Claude instance inside T3 Code, with the key stored as a secret and the model answering in a thread. From here you can:
- Endpoints and API paths — the three protocols and every QCode host
- Codex setup — the
config.tomlandauth.jsonside of the GPT route - Tool compatibility — which tool speaks which protocol
- Compare the plans on the pricing page before you commit to long-term use
- Go back to your Dashboard to check usage and balance
Common errors¶
| Error message | Why | What to do |
|---|---|---|
Not authenticated |
The QCode instance has no usable key yet: a row is still empty, the key was pasted with a space at one end, or the base URL was saved as a hidden secret |
Open the instance, retype ANTHROPIC_AUTH_TOKEN with the cr_ key, make sure ANTHROPIC_BASE_URL shows https://api.qcode.cc/api in plain text, then click outside the fields to save |
Stored secret, enter a new value to replace |
The value was typed while the row's padlock was still closed, so T3 Code stored it as sensitive and never shows it again | Click the padlock to unlock the row, retype the value, and click outside the field; keep the padlock closed only on the key row |
No models found |
The picker searches the display names in the list, so a hyphenated model ID matches nothing | Clear the field and search the display name, for example Opus 5.5; if the list itself is empty, the instance is not authenticated |
That model is already built in. |
+ Add custom model was used for an ID that T3 Code already ships with | Press Cancel and select the model in the chat picker instead; reserve custom IDs for models outside the built-in list |
CodexAppServerSpawnError |
t3 starts a Codex app server at launch and there is no codex command on the machine |
Install Codex CLI and restart t3, or dismiss the Codex banner; it does not affect the QCode Claude instance |
FAQ¶
The model I want is not in the picker¶
Connect the instance first, then check Models inside it. Claude models are built in; any other QCode model has to be added by its full ID with + Add custom model. In the chat, search the display name rather than the hyphenated ID.
What happens when my key expires?¶
It depends on what you bought. A key that came with a personal plan cannot be renewed — reopen the plan, create a new key and paste it into the QCode instance. A key from a pay-as-you-go pack comes back as soon as you buy another pack: the same key keeps working, so nothing changes in T3 Code.
Can I use GPT models in T3 Code?¶
Not in a Claude instance. Claude models are served only on the Anthropic endpoint, so a GPT ID there is rejected. Add a Codex instance instead, as described under Codex instances below.
Which model should I use day to day?¶
claude-opus-5-5 for Anthropic models, gpt-6.2-sol for GPT through a Codex instance, with claude-haiku-5-5 as a lighter Claude option. The full list of what QCode serves is at qcode.cc/en/models.
Does the same key work on the other QCode hosts?¶
Yes. Replace the domain in ANTHROPIC_BASE_URL with asia.qcode.cc or us.qcode.cc and keep the /api path. All three hosts serve the same models and differ only in network routing.
How do I get back to a plain Claude Code setup?¶
Remove the environment variables from the QCode instance, or delete the instance in Settings > Providers. The built-in Claude row keeps working as before, with its own config folder.
At a glance¶
| Item | Details |
|---|---|
| What it is | T3 Code is an agent control surface with a desktop app, a web app and a mobile app. It drives the agents already on your machine and is not a harness itself |
| Models you can use | Claude ✅ through a Claude instance pointed at the Anthropic endpoint (claude-opus-5-5, claude-haiku-5-5) · Chinese models (GLM / Kimi / DeepSeek / Qwen) are also served on that endpoint, see Endpoints and API paths · GPT ✅ only through a Codex instance (gpt-6.2-sol) · Gemini ❌ (QCode does not offer the Gemini series) |
| Protocol and base URL | Anthropic: https://api.qcode.cc/api |
| Where to configure | Settings > Providers → your QCode Claude instance → Environment → Variables |
| Official docs | T3 Code Claude provider guide · FAQ |
Which protocol¶
T3 Code does not call a model API on its own. In the official FAQ: "T3 Code uses those harnesses. It is not a harness, and it does not work without one." For Claude the harness is Claude Code, so QCode is wired in the same way as for Claude Code itself: an Anthropic Messages base URL plus a QCode key.
The same FAQ confirms you can use an API key or a router instead of a subscription: add another provider instance in Settings and give it its own keys and endpoint. Your existing setup stays untouched — which is exactly what the QCode instance above does.
| You want | Use in T3 Code | QCode ANTHROPIC_BASE_URL |
|---|---|---|
Claude (claude-opus-5-5, claude-haiku-5-5 …) |
A Claude instance with its own Environment → Variables | https://api.qcode.cc/api |
Codex / GPT (gpt-6.2-sol) |
A Codex instance, see Codex instances below | not applicable |
Claude models only work on the Anthropic protocol, so the base URL stops at /api; Claude Code appends /v1/messages itself. Do not add a trailing /, and do not add /v1/messages yourself. The full protocol table is in Endpoints and API paths.
The same key works on the other two QCode access hosts — asia.qcode.cc and us.qcode.cc. Swap the domain in ANTHROPIC_BASE_URL and keep the /api path; all three serve the same models and differ only in network routing.
Install commands for every platform¶
The command-line runtime is one command per platform, and the desktop app is on the release page:
| Platform | Install |
|---|---|
| Windows (PowerShell) | irm https://t3.codes/install.ps1 piped into iex, as shown above |
| Windows (winget) | winget install T3Tools.T3Code |
| macOS | brew install --cask t3-code |
| Debian, Ubuntu | sudo apt install ./T3-Code-*.deb |
| Arch Linux | yay -S t3code-bin |
On macOS and Linux the script route is curl -fsSL https://t3.codes/install.sh | sh. Run t3 to start the server and open the local web app; npx t3@latest runs it once without installing. There is no t3 executable for Intel Macs — use the desktop app there.
Codex instances¶
A Codex instance is how GPT models reach QCode, since the Anthropic endpoint does not serve them. T3 Code's Codex guide covers signing in with ChatGPT or with an existing Codex CLI login, and an instance that uses your installed Codex reads the config.toml of its CODEX_HOME.
So set Codex up for QCode first, as described in the Codex guide: the qcode provider in ~/.codex/config.toml and your key as OPENAI_API_KEY in ~/.codex/auth.json. Then, in Settings > Providers, add a Codex instance, choose Configure manually and complete the wizard, pointing CODEX_HOME path at the folder that holds those two files (for example ~/.codex). Select that instance, and a model such as gpt-6.2-sol, in the thread's model picker.
The ChatGPT connection made inside T3 Code is different: T3 Code sets its own provider for it and removes OPENAI_BASE_URL, so QCode settings do not apply to that connection.
Advanced configuration¶
- Variables belong in Environment → Variables, not in Launch arguments. A variable typed into Launch arguments looks saved but never reaches the agent.
- Sensitive values are stored separately and are never returned to the app, so a key row only shows
Stored secret, enter a new value to replaceonce it is saved. To change the key, type a new value into that row. ANTHROPIC_DEFAULT_*_MODELvariables map Claude Code aliases such assonnetorhaiku; they do not replace the model you select in T3 Code. Pick the real model in the chat picker.- Custom models may offer fewer controls than built-in ones — fewer reasoning-effort, thinking or context options.
- A dedicated config folder keeps things separate.
~/.claude_qcodeholds its own.claude.json,backups/andsessions/, so the QCode instance never mixes with a personal Anthropic login. - Language and display settings sit under Settings > General > Display;
System defaultfollows your browser or your Windows language.
Known limitations¶
- T3 Code describes itself as early software: "We are very very early in this project. Expect bugs." Field names and screen layouts can change between releases, so check the version number before you compare your screen with these screenshots.
- The router setup here is written for Claude instances; GPT models go through a Codex instance instead.
- On a remote connection T3 Code uses the Claude configuration on the connected server, so the instance has to be set up on the machine that runs the agent.
- Claude models are served only on the Anthropic endpoint. Selecting a GPT model inside the
QCodeClaude instance ends in a rejected request.
Related docs¶
- Endpoints and API paths — protocol × model-family table
- Tool compatibility — which tools speak which protocol
- Codex CLI —
config.tomlfor QCode - DeepSeek Harness (dsh) — an agent harness with a custom model API form
Get started with QCode
One API key for Claude Code, Codex and more — billed per token, per-model prices on qcode.cc/models