Client setup

ZhenAPI.ai Toolkit Guide

Download Toolkit for Windows, sign in through your browser and import an API key into your agents. Learn how to check usage, restore configurations and update Toolkit.

ZhenAPI.ai Toolkit is a Windows desktop app. Authorize it once in your browser, then check your balance and usage, manage API keys, and write a key and its models into Codex, Claude Code and 11 other agents in one click. No hand-editing config files: every write is backed up and encrypted first, so you can always roll back.

Download for Windows

No installer. Download it and double-click to run; on first launch it offers to update to the latest version. A macOS version will follow.

Version always latestOS Windows 10 / 11Arch x64Size about 20 MB
Download zhenapi-toolkit.exe

If your browser says the file "isn't commonly downloaded", choose "Download suspicious file" or "Keep". If Windows says it "protected your PC", click "More info → Run anyway". Why?

Quick start

  1. Download and openKeep it in a permanent folder and double-click
  2. Authorize in browserMatch the pairing code, then authorize
  3. Import a keyPick a key and model, preview, then apply
  4. Launch your agentReopen the client and use ZhenAPI models
One-click agent setupDetects the clients on this computer and can install or upgrade the ones you need.
Preview before writingShows every line it will change, with the key masked. Nothing is written until you confirm.
Encrypted backupsKeeps your original config from before the first change, so you can restore official sign-in any time.
Balance, usage and keysCheck usage and create, edit or delete keys without opening the website.

Supported agents:

CodexChatGPT DesktopClaude CodeClaude DesktopOpenCodePiGrok BuildHermes AgentOpenClawWorkBuddyCodeBuddyDeepSeek Harness DesktopClineCherry Studio

Codex and ChatGPT Desktop share one configuration, so a single import covers both.

Step 1: Download and open

  1. Click the download button above to get zhenapi-toolkit.exe. Only download it from zhenapi.ai, never from a forwarded copy.
  2. Move it to a folder you plan to keep and can write to, such as D:\Tools\ZhenAPI. Updates replace this file in place, so don't leave it in Downloads to be cleaned up, and don't put it in C:\Program Files.
  3. Double-click to run. The app is not code-signed yet, so Windows may show "Windows protected your PC". Click More info → Run anyway.
Toolkit needs Microsoft Edge WebView2. It ships with Windows 11 and up-to-date Windows 10. If no window appears, install the WebView2 Runtime through Windows Update or from Microsoft. To check whether your PC is x64, see "System type" under Settings → System → About.

Step 2: Authorize in your browser

Your password never passes through Toolkit. You sign in on the website with a password, GitHub or Google.

Toolkit sign-in screen; marker 1 is the Sign in with browser button
Click "Sign in with browser"
Toolkit waiting for authorization; marker 2 is the pairing code, marker 3 is Reopen browser
Toolkit shows a pairing code and waits
  1. Open Toolkit and click Sign in with browser. Your default browser opens the authorization page on zhenapi.ai. Sign in first if needed.
  2. Toolkit shows a pairing code like XXX-XXX. Keep this window open.
  3. If the browser didn't open, click Reopen browser, or click "Copy link" and paste it into a browser on this computer.
Authorization card on the console Desktop Toolkit page; marker 1 is the pairing code, 2 is the computer name, 3 is the Authorize button
Console authorization card (demo data)
  1. Check that the pairing code exactly matches the one in Toolkit.
  2. Make sure the computer name is the one you're using.
  3. Click Authorize. The browser comes back to this page with "Authorized", and this computer shows up in the list below; Toolkit opens the Overview within a few seconds.
If the code doesn't match, or you didn't start this request, don't click Authorize. Click Deny or close the page, then click Cancel in Toolkit and start again. You stay signed in as long as you use Toolkit within 90 days. Each account can authorize up to 20 devices; view them and sign out unused ones on the console Desktop Toolkit page.

Step 3: Get to know the Overview

After you sign in, Toolkit opens the Overview. Almost everything starts here.

Toolkit Overview; markers 1 to 6 are account balance, active keys, status light, row actions, update configuration and install
Overview (demo data)
  1. Account balance: "Top up" opens the top-up page in your browser.
  2. Active keys: opens the API keys page.
  3. Status light: what each agent is connected to. See the colors below.
  4. Row actions: "Import key", "Launch" and the "···" menu.
  5. Update configuration: appears when a key's group or models change. Open it to see which models were added or removed; nothing is written until you confirm.
  6. Install: install an agent that isn't on this computer yet. Installed agents show "Upgrade" when a new version is out.
Green: connected to ZhenAPI and workingRed: set up for ZhenAPI, but the connection fails or the key is missingYellow: using another third-party serviceGray: no third-party service, or not installed

You can filter the list to installed agents. After installing or removing a client, click "Detect again".

Step 4: Install or upgrade an agent (skip if installed)

Install dialog for Pi; marker 1 is the list of commands, marker 2 is the Start button
Installing Pi
  1. After you click "Install", Toolkit lists the commands it will run. They run in order and stop as soon as one succeeds.
  2. Review them and click Start. Output appears line by line.
  • Agents with an official installer use it first. npm installs try the China mirror registry.npmmirror.com first, then the official registry.
  • If Node.js is missing on Windows, Toolkit installs Node.js LTS with winget first.
  • ChatGPT Desktop and Claude Desktop are upgraded with winget. Quit the app first, or use "Quit and upgrade".
  • WorkBuddy, DeepSeek Harness Desktop and Cherry Studio only offer "Get app", which opens their website. Install them, then click "Detect again".

Step 5: Import a key

No key yet? Go to "API keys" in the sidebar and click "Create API key". See Manage API keys.

1. Choose a key and model

Import key into Codex; marker 1 is the API key menu, 2 is the model menu, 3 is Preview changes
Click "Import key" on the Codex row (demo data)
  1. API key: choose by name, group and last four characters. Only keys that work with this agent are listed.
  2. Model: keep "All models" to import every model the key can use, or choose one to make it the default at launch.
  3. Click Preview changes.

2. Review and apply

Preview dialog; marker 1 is the file to change, 2 is the diff, 3 is Apply changes
Preview before writing; the key shows as ********
  1. The file path to change, such as ~\.codex\config.toml for Codex.
  2. The changes line by line: green is added, red is removed.
  3. If everything looks right, click Apply changes. The original file is backed up and encrypted first.

If you see "Another program changed a file after the preview", go back and preview again. Toolkit won't overwrite changes it hasn't shown you.

3. Restart the client

Configuration updated dialog; marker 1 is Restart ChatGPT Desktop, marker 2 is Later
After a successful write
  1. If the client is running, Toolkit offers Restart ChatGPT Desktop or Restart Claude Desktop; Codex also offers to restart the Codex daemon. Save your work first.
  2. Click Later to skip; the change applies next time you open the client.

How each agent picks up the change

AgentAfter importing
Codex / ChatGPT DesktopOne import covers both. Start a new Codex session, or quit ChatGPT Desktop completely and reopen it. The desktop app switches to accountless mode; use "Restore official sign-in" to switch back.
Claude CodeNew Claude Code processes use the new config, and /model lists every model for the key. The VS Code extension shares the CLI config: enable "Disable Login Prompt" in its settings and reload the window if needed.
Claude DesktopThe import page lists models Claude Desktop can use. Quit Claude from the tray or menu, then reopen it.
OpenCode, Pi, ClineReopen the client (Cline CLI or VS Code) and pick a ZhenAPI model in the model list.
Grok Build, Hermes AgentStart a new session in the client.
OpenClawThe config loads automatically. In an open session, run /model default to switch to the new default model.
WorkBuddyQuit and reopen WorkBuddy, then pick a model in your task.
CodeBuddyPick a model in CodeBuddy IDE. The interactive CLI may still ask you to sign in to CodeBuddy the first time.
DeepSeek Harness DesktopNew sessions use the new default model; switch an existing session with /model.
Cherry StudioClick "Import in Cherry Studio", confirm in Cherry Studio, then sync models. On first launch, finish or skip Cherry Studio's setup wizard first.
Group restrictions: groups restricted to Claude Code work only with Claude Code and Claude Desktop; groups restricted to Codex work only with Codex. Groups with only image models can't be used with agents. Use a different key.

Use one key in several agents

On the API keys page, click "Apply" on a key's row to write it into several agents at once.

Apply to agents dialog; marker 1 is the agent checkboxes, 2 is each agent's model menu, 3 is Preview changes
Apply to agents (demo data)
  1. Select the agents. Only installed agents that work with this key are listed.
  2. Choose a default model for each one.
  3. Click Preview changes, review each agent, then confirm. Cherry Studio still needs to be confirmed in the client.

Manage API keys

API keys page; markers 1 to 5 are Create API key, copy, view usage, edit and apply
API keys (demo data)
  1. Create API key: enter a name and pick a group. You can also use a custom key and set a total spending limit, limits per period (5 hours, 1 day, 7 days) and an expiration.
  2. Copy the full key.
  3. View usage: opens Usage filtered to this key.
  4. Edit: change the name, group or limits, or clear "Enable this key" to pause it.
  5. Apply: write the key into several agents. See the previous section.

Deleting a key asks you to check its name and last characters. It can't be undone, and any agent using it needs another key.

Usage

Usage page; marker 1 is the period, 2 is the key filter, 3 is Refresh, 4 is Recent requests
Usage (demo data)
  1. Period: Today, Yesterday, Last 7 days, Last 30 days. Today and Yesterday are shown by hour, the rest by day.
  2. Key filter: all keys, or just one.
  3. Refresh: data is cached for 60 seconds; refresh to fetch the latest.
  4. Recent requests: model, tokens, duration and actual cost per request, with paging. Very recent requests may take a moment to appear.

Launch an agent

After importing, click "Launch" on the agent's row in the Overview. CLI agents ask for a working folder and open in a terminal with the new config; desktop apps open directly.

If OpenClaw's terminal asks "Update NodeJS", type Y and press Enter.

Backups, restore and more

The ··· menu on the Codex row, with session history sync, restore backup, restore official sign-in, configuration details, uninstall CLI and uninstall desktop app
Click "···" at the end of an agent row (marker 1)
Menu itemWhat it does
Restore official sign-inCodex, Claude Code, Claude Desktop: removes the ZhenAPI config and returns to official account sign-in. Review, then click "Confirm restore".
Remove ZhenAPIOther agents: removes the ZhenAPI provider Toolkit added and leaves the rest of the config alone.
Restore backupGo back to the config from before a given change. See below.
Session history syncCodex only: move your local official Codex sessions under ZhenAPI so you can keep viewing them, or move them back. Sessions with encrypted reasoning may not continue after switching.
Configuration detailsConfig file location, current address and model. Environment variable conflicts are handled here too; see the FAQ.
UninstallUninstall the CLI or desktop app. Optionally delete the config files (backed up and encrypted first) and clean up dependencies and caches.

"Restore official sign-in" and "Remove ZhenAPI" appear only when the agent is set up for ZhenAPI.

Restore backup dialog; marker 1 is the Official baseline tag, marker 2 is Restore this backup
Restore backup (demo data)
  1. Official baseline: your original config from before Toolkit's first change, kept forever. The latest 30 other backups are kept, each labeled with a reason (before import, before restore, before restoring official sign-in, before clearing environment variables, before uninstall).
  2. Pick one and click Restore this backup, review, click "Confirm restore", then reopen the client.

Backups are encrypted with AES-256-GCM, and the key is kept in Windows Credential Manager. Cherry Studio manages its own providers, so they aren't part of Toolkit's backups.

Update Toolkit

The official release checks for updates at launch and every 6 hours after that. When a new version is available, a notice pops up in the bottom-right corner and a red dot appears on "Settings" in the sidebar.

New version notice; marker 1 is the red dot on Settings, marker 2 is Update and restart in the bottom-right card
When a new version is available
Settings page; marker 1 is Check for updates, 2 is Update and restart, 3 is Create shortcut
Settings → App updates
  1. The red dot means an update is ready. You can also open Settings and click Check for updates any time.
  2. Save your work, then click Update and restart. Toolkit verifies the signature, replaces itself and restarts. If the new version fails to start, it rolls back.
  3. Settings can Create shortcut on the desktop, and Toolkit also offers it on first launch.

Settings also lets you change the theme (System, Light, Dark) and display language (简体中文, 繁體中文, English).

Security and privacy

  • You only enter your password on zhenapi.ai. Toolkit never sees it.
  • Sign-in tokens and the backup encryption key are stored in Windows Credential Manager.
  • Keys always show as ******** in previews, and Toolkit only changes the files listed there.
  • For a computer you no longer use, sign it out on the console Desktop Toolkit page or in Toolkit.

FAQ